code | string | - | The text to show, and what Copy puts on the clipboard. |
| The text to show, and what Copy puts on the clipboard. |
lines | ReactNode[] | - | |
|
title | string | - | A file name in the header, beside a file icon. |
| A file name in the header, beside a file icon. |
icon | ReactNode | - | A glyph before title, in place of the file icon. |
A glyph before title, in place of the file icon. |
tabs | CodeBlockTab[] | - | Versions of the same snippet, one per tab, such as package managers. |
| Versions of the same snippet, one per tab, such as package managers. |
highlightLines | number[] | - | Lines to mark, counting from 1. |
| Lines to mark, counting from 1. |
lineNumbers | boolean | true | Numbers down the left. |
| Numbers down the left. |
maxLines | number | 20 | |
|
fill | boolean | false | Takes its container's height and scrolls inside it, in place of maxLines. |
Takes its container's height and scrolls inside it, in place of maxLines. |
copyLabel | string | Copy | What the copy button says. |
| What the copy button says. |
copiedLabel | string | Copied | What the copy button says for a moment once it has copied. |
| What the copy button says for a moment once it has copied. |
shape | none | rounded | pill | rounded | |
|
animated | boolean | true | |
|
className | string | - | |
|
focus | boolean | string | true | |
|