Line Numbers
Line numbers, the fold gutter and the active line highlight for the code editor.
Preview
Ln 1, Col 1tsx
Installation
Add the item with the shadcn CLI, or copy the source manually.
pnpm dlx shadcn@latest add litingyes/blocove/code-editor-line-numbersRequires a shadcn/ui project set up with Base UI primitives. Blocove is developed against the b0 preset, but it installs no base config or theme tokens: your own preset, fonts and colors stay in place.
Or install from the namespace after adding the registry: npx shadcn@latest add @blocove/code-editor-line-numbers
This example also uses: code-editor
pnpm dlx shadcn@latest add litingyes/blocove/code-editorAPI Reference
Props accepted by the exported components.
CodeEditorLineNumbers
Declares the editor chrome: line numbers, the fold gutter and the active line highlight.
| Prop | Type | Default |
|---|---|---|
foldable | boolean | true |
activeLine | boolean | true |
indentSize | number | 2 |