The page
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.
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#
Edit this page:
docs/kit/code.md