@motion-script/code / CodeHighlightStyle
Interface: CodeHighlightStyle
Defined in: components/code/src/style.ts:24
A code theme: an ordered list of tag→color rules plus a fallback color for any
text the parser produces no highlight tag for (operators, punctuation, plain
identifiers in some grammars, etc.). Pass a custom one via the Code node's
theme prop to recolor highlighting without touching the highlighter wiring.
Remarks
Later rules win when several match the same tag, matching how
@lezer/highlight's tagHighlighter resolves precedence.
Properties
defaultColor
defaultColor:
string
Defined in: components/code/src/style.ts:28
Color applied to text with no matching tag.
name
name:
string
Defined in: components/code/src/style.ts:26
Stable name, used as the highlighter cache key.
rules
rules:
CodeStyleRule[]
Defined in: components/code/src/style.ts:29