Languages

Language support for the code editor: syntax aware indentation, bracket matching, folding and completion.

UIcode-editor-languagesView JSON

Language support parses the document for indentation, bracket matching and folding. Colors are not part of it: pair it with code-editor-shiki for highlighting. Supported languages: css, html, javascript (js), json (jsonc), jsx, markdown (md), tsx, typescript (ts).

Preview

Ln 1, Col 1ts

Installation

Add the item with the shadcn CLI, or copy the source manually.

pnpm dlx shadcn@latest add litingyes/blocove/code-editor-languages

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

This example also uses: code-editor

pnpm dlx shadcn@latest add litingyes/blocove/code-editor

API Reference

Props accepted by the exported components.

CodeEditorLanguages

Declares the language extension for the document. The grammar loads the first time the language is used.

PropTypeDefault
languagestringroot language