The page
The kit
code: the highlighter, and the code blocks
The page
kit/code.md

code: the highlighter, and the code blocks

Highlight is a kit component, written in Mote over the syntax battery (text.md): what Shiki is to shadcn's and AI Elements' code blocks. kit/code.mote holds it, and those blocks over it, under their names. Gallery: examples/kit/code.mote. Test: tests/kit_code.real.mjs.

text
state src = "const n: number = 1;\n"
CodeBlock code=src language="ts" showLineNumbers title="app.ts"
CodeBlock
CodeBlockHeader
CodeBlockTitle
CodeBlockFilename "app.ts"
CodeBlockActions
CodeBlockLanguageSelector value=lang
CodeBlockCopyButton value=src
CodeBlockContent code=src language=lang lineNumbers=true
CodeBlockFooter
text "1 line"

Highlight#

The components#

What differs from the originals#

Languages#

Token classes#

For other widgets#

The gallery's samples#

esc
1072 sections of 111 pages, ranked as you type.A heading's words count for more than what stands under it.
↑↓move
↵open
ranked by BM25, in the page