Usage
Size
Disabled state
Copy to clipboard
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | The code value to display and edit. |
onValueChange | (value: string) => void | - | Callback when the code value changes. |
language | CodeMirrorLanguage | 'unknown' | Programming language for syntax highlighting. |
size | 'sm' | 'md' | 'lg' | 'md' | Size of the code editor. |
disabled | boolean | - | Whether the editor is read-only. |
copyToClipboard | boolean | - | Whether to show the copy button. |
extensions | Extension | Extension[] | - | Additional CodeMirror extensions. |
backgroundColor | string | 'var(--lb-product-color-background-surface-base-bold)' | Background color of the editor. |
className | string | - | Additional CSS classes to apply. |