Usage
Size
Line highlight
Hide line numbers
Props
| Prop | Type | Default | Description |
|---|---|---|---|
code* | string | - | The code string to highlight |
language | Language | 'text' | Programming language for syntax highlighting |
size | 'sm' | 'md' | 'lg' | 'md' | Size of the code block |
showLineNumbers | boolean | true | Whether to show line numbers |
copyToClipboard | boolean | true | Whether to show the copy button |
highlight | string | - | Line numbers to highlight (e.g., '1,3-5') |
explainWithAi | boolean | true | Whether to show the AI explain button |
maxHeight | string | - | Maximum height of the code block |