Theme tokens reference
Every theme setting is a token : a dotted path such as colors.primary with a value. The Theme view, presets and the AI all change the theme by setting tokens, one set theme token command per token. This page lists every token, its allowed values and its default.
Every theme setting is a token: a dotted path such as colors.primary with a value. The Theme view, presets and the AI all change the theme by setting tokens, one set_theme_token command per token. This page lists every token, its allowed values and its default.
Colors
| Token | Default | Accepted values |
|---|---|---|
colors.primary | #6055d9 | Hex color |
colors.secondary | #0f9d8a | Hex color |
colors.background | #f7f8fc | Hex color |
colors.surface | #ffffff | Hex color |
colors.text | #222638 | Hex color |
colors.muted | #788092 | Hex color |
colors.border | #e5e7ef | Hex color |
colors.success | #2f9e6e | Hex color |
colors.warning | #c98a1b | Hex color |
colors.danger | #d14b62 | Hex color |
Typography
| Token | Default | Accepted values |
|---|---|---|
typography.fontFamily | Inter, 'Segoe UI', Arial, sans-serif | CSS font stack, up to 120 characters |
typography.headingFontFamily | Inter, 'Segoe UI', Arial, sans-serif | CSS font stack, up to 120 characters |
typography.baseSize | 14 | Number 10–24 (the Theme slider offers 12–18) |
typography.scale | 1.2 | Number 1–1.6 (the Theme list offers 1.125, 1.2, 1.25, 1.333) |
Spacing and shape
| Token | Default | Accepted values |
|---|---|---|
spacing.unit | 4 | Number 2–16 |
spacing.density | comfortable | compact, comfortable, spacious |
radii.sm | 6 | Number 0–40 |
radii.md | 10 | Number 0–40 |
radii.lg | 14 | Number 0–60 |
shadows.intensity | 1 | Integer 0–3 (None, Soft, Medium, Strong) |
Component styles
| Token | Default | Accepted values |
|---|---|---|
componentStyles.button | solid | solid, soft, outline |
componentStyles.input | outline | outline, filled, underline |
componentStyles.card | bordered | bordered, elevated, flat |
componentStyles.table | lines | lines, striped, plain |
componentStyles.nav | top | top, sidebar, none |
Brand assets and fonts
| Token | Default | Accepted values |
|---|---|---|
logoAssetId | none | Id of an uploaded image asset, or null to remove |
faviconAssetId | none | Id of an uploaded image asset, or null to remove |
customFonts | none | List of { family, assetId } entries |
mode | none | light or dark (reserved; apps render the light theme today) |
How tokens become styles
Theme token CSS variable Used by
colors.primary -> --mab-primary buttons, links, focus rings
--mab-primary-ink text on primary (auto)
--mab-primary-soft soft buttons, highlights (auto tint)
typography.baseSize -> --mab-text-base body text
--mab-h1 … --mab-h4 headings (base × scale^n)
radii.md -> --mab-radius cards, inputs, buttons
spacing.density -> --mab-gap, --mab-pad grid gaps, card padding
shadows.intensity -> --mab-shadow-sm/md/lg menus, dialogs, elevated cardsSetting tokens with the AI
The AI's set_theme_token operation takes { token, value }. The AI rules list these tokens as supported: colors.primary, colors.secondary, colors.background, colors.surface, colors.text, typography.fontFamily, radii.md, spacing.density, componentStyles.button, componentStyles.card, componentStyles.nav. Without an AI key, the local planner recognises colors ("change the accent color to #2563eb"), density ("more compact", "more spacious"), corners ("rounded corners", "square corners") and "sidebar navigation".
Common mistakes
- A value outside the range. The command is rejected and nothing changes; for example
shadows.intensity4 orradii.lg80. - Setting
radii.mdalone and expecting small and large to follow. Only the Theme slider derives the other two; a direct token change sets one radius. - Expecting
mode: darkto switch the app to dark mode. The token exists for the future; dark mode is not available yet.
Advanced
Tokens are validated by the theme schema (ThemeSchema) on every transaction, and set_theme_token uses path (not token) in its command payload. resetTokens() computes the tokens that differ from DEFAULT_THEME and sets them back in one transaction, excluding logoAssetId, faviconAssetId and customFonts. The full command reference is at Builder commands.