Code Highlight

Syntax highlighted code.

Usage

Size

Line highlight

Hide line numbers

Props

PropTypeDefaultDescription
code*string-The code string to highlight
languageLanguage'text'Programming language for syntax highlighting
size'sm' | 'md' | 'lg''md'Size of the code block
showLineNumbersbooleantrueWhether to show line numbers
copyToClipboardbooleantrueWhether to show the copy button
highlightstring-Line numbers to highlight (e.g., '1,3-5')
explainWithAibooleantrueWhether to show the AI explain button
maxHeightstring-Maximum height of the code block