Skip to content

Syntax Theme

@astryxdesign/core v0.7.1 · SyntaxTheme

Props ​

NameTypeDefaultDescription
themeSyntaxThemeDefinition—A preset, or a theme from defineSyntaxTheme().

Slots ​

NameDescription
defaultCode components that inherit these colors.

Tokens ​

keyword, string, comment, number, function, type, variable, operator, constant, tag, attribute, property, punctuation, and background.

useSyntaxTheme ​

Returns null when no SyntaxTheme or theme syntax field is present.

FieldDescription
nameSyntax theme name.
modeMode used to pick a light-dark() stop.
token(name)One syntax token for that mode.
tokensEvery syntax token for that mode.

Native attributes ​

The root is a div. class and style are applied to it.