Syntax Theme
@astryxdesign/core v0.7.1 · SyntaxTheme
Props
| Name | Type | Default | Description |
|---|---|---|---|
theme | SyntaxThemeDefinition | — | A preset, or a theme from defineSyntaxTheme(). |
Slots
| Name | Description |
|---|---|
default | Code 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.
| Field | Description |
|---|---|
name | Syntax theme name. |
mode | Mode used to pick a light-dark() stop. |
token(name) | One syntax token for that mode. |
tokens | Every syntax token for that mode. |
Native attributes
The root is a div. class and style are applied to it.