The <code-block>
component renders highlighted code sample with copy button. Under the hood it uses highlight.js
Note
The component doesn't format code sample, please ensure that your code is well-formatted
<code-block language="json">
{
"name": "package-name",
"version": "1.0"
}
</code-block>
Name | Type | Default | Description |
---|---|---|---|
language | String |
undefined |
Which language to highlight |