Line Numbers

Line numbers, the fold gutter and the active line highlight for the code editor.

UIcode-editor-line-numbersView JSON

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-numbers

Requires 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-editor

API Reference

Props accepted by the exported components.

CodeEditorLineNumbers

Declares the editor chrome: line numbers, the fold gutter and the active line highlight.

PropTypeDefault
foldablebooleantrue
activeLinebooleantrue
indentSizenumber2