Tokens
Slant / Foundations
Every --sl-* variable, what it drives, and its value in each theme.
Demo
Usage
/* Your own component can read the same tokens, so it follows the theme. */
.my-card {
padding: var(--sl-space-lg);
background: var(--sl-surface);
border: 1px solid var(--sl-line);
border-radius: var(--sl-radius);
box-shadow: var(--sl-shadow-sm);
color: var(--sl-text);
font: var(--sl-font-size-md)/1.5 var(--sl-font-sans);
transition: border-color var(--sl-duration-base) var(--sl-ease-out);
}
.my-card button { min-height: var(--sl-control-md); }
.my-card .pixel { background: var(--sl-accent); transform: var(--sl-slant); }The values come from shared/kit-tokens.json, the one source the stylesheet, the themes list and TUTTNKit's TUTTNTheme are generated from. A contrast gate keeps text, muted text, state colours, primary buttons and text on the tinted backgrounds at 4.5:1 in every theme. The same values are served as tokens.json. See Theming for switching themes and adding your own.
Theme tokens
| Token | Sage | Moon | Ember | Paper | Drives |
|---|---|---|---|---|---|
--sl-bg | #11151b | #0e1220 | #1a1310 | #f4f4ef | Page background, inputs, the command bar, loader stages |
--sl-surface | #171c23 | #151a2b | #221915 | #fcfcf9 | Cards and menus |
--sl-surface-2 | #1f252e | #1d2338 | #2c211b | #eeeee8 | Secondary buttons, selected tabs and options, tracks |
--sl-line | #2a313b | #283049 | #3a2c24 | #e2e2da | Hairlines and dividers |
--sl-line-strong | #3a424e | #39425f | #4d3a2f | #cfd0c6 | Borders of controls |
--sl-text | #f1f3f5 | #eef1ff | #f7ede6 | #1b1f19 | Text |
--sl-muted | #99a3b1 | #9aa3c4 | #bba596 | #5f645b | Secondary text, hints, labels |
--sl-accent | #abbba1 | #9db4ff | #f1b38a | #4f6443 | Primary buttons, selection, the slanted pixel |
--sl-accent-text | #11151b | #0e1220 | #1a1310 | #fcfcf9 | Text on an accent, success, warning or danger fill |
--sl-success | #8fd3a8 | #8fd3a8 | #8fd3a8 | #287a4c | Done states |
--sl-warning | #f1c27d | #f1c27d | #f1c27d | #9c6210 | Attention states |
--sl-danger | #f0957a | #f0957a | #f0957a | #b5482c | Errors, failures and destructive actions |
--sl-radius-small | 6px | 8px | 2px | 7px | Buttons, badges, inputs and other small corners |
--sl-radius | 10px | 14px | 4px | 12px | Cards, bubbles and other large corners |
--sl-radius-large | 14px | 20px | 6px | 16px | Sheets and dialogs |
--sl-shadow-sm | 30% #000000 | 30% #000000 | 30% #000000 | 8% #1b1f19 | Raised controls and cards |
--sl-shadow-md | 50% #000000 | 50% #000000 | 50% #000000 | 20% #1b1f19 | Menus and popovers |
--sl-shadow-lg | 60% #000000 | 60% #000000 | 60% #000000 | 26% #1b1f19 | Dialogs |
color-scheme | dark | dark | dark | light | Native scrollbars and form controls |
Control heights
Buttons, inputs, segmented controls and chips take their height from --sl-control-sm, -md and -lg. A root's density, or data-density on any element inside one, moves the whole scale.
| Density | --sl-control-sm | --sl-control-md | --sl-control-lg |
|---|---|---|---|
compact | 26px | 32px | 38px |
regular (default) | 28px | 34px | 40px |
comfortable | 32px | 40px | 46px |
Scales
| Token | Value | Drives |
|---|---|---|
--sl-space-3xs | 2px | Gaps and padding |
--sl-space-2xs | 4px | |
--sl-space-xs | 6px | |
--sl-space-sm | 8px | |
--sl-space-md | 12px | |
--sl-space-lg | 16px | |
--sl-space-xl | 24px | |
--sl-space-2xl | 32px | |
--sl-font-size-xs | 11px | Labels (xs) up to stat values (2xl) |
--sl-font-size-sm | 12px | |
--sl-font-size-md | 13px | |
--sl-font-size-lg | 14px | |
--sl-font-size-xl | 18px | |
--sl-font-size-2xl | 22px | |
--sl-duration-fast | 150ms | Presses and hovers (fast) up to draws and grows (slower) |
--sl-duration-base | 200ms | |
--sl-duration-slow | 300ms | |
--sl-duration-slower | 600ms | |
--sl-ease-out | cubic-bezier(.2, .7, .2, 1) | out for entrances and indicators, in-out for moves |
--sl-ease-in-out | cubic-bezier(.4, 0, .2, 1) | |
--sl-z-dropdown | 1000 | z-index of menus, sticky bars, overlays, dialogs, toasts and tooltips |
--sl-z-sticky | 1100 | |
--sl-z-overlay | 1200 | |
--sl-z-modal | 1300 | |
--sl-z-toast | 1400 | |
--sl-z-tooltip | 1500 |
Everything else
| Token | Value | Drives |
|---|---|---|
--sl-accent-soft | color-mix(accent 16%, surface) | Tinted backgrounds: accent badges, chosen plans, ranges |
--sl-success-soft | color-mix(success 16%, surface) | A success tint behind text in --sl-text |
--sl-warning-soft | color-mix(warning 16%, surface) | A warning tint behind text in --sl-text |
--sl-danger-soft | color-mix(danger 16%, surface) | A danger tint behind text in --sl-text |
--sl-line-field | color-mix(muted 65%, line-strong) | The edge of text fields: Input, Textarea, Select, TagInput, TimeField, InputGroup, ShortcutRecorder, PromptInput and MarkdownEditor. It holds 3:1 on bg, surface and surface-2 |
--sl-tone, --sl-tone-soft, --sl-tone-text | from data-tone | The colour, tint and on-fill text of the element's tone; components read these instead of a rule per tone |
--sl-radius-full | 999px | Pills and round marks |
--sl-focus-ring | 2px solid accent, 2px offset | The keyboard focus outline on every Slant control |
--sl-disabled-opacity | 0.55 | Disabled and loading controls |
--sl-font-sans | system-ui, … | Body text (the site sets Inter here) |
--sl-font-mono | ui-monospace, … | Labels, numbers, code |
--sl-slant | skewX(9deg) | The slanted pixel's transform, matching the TUTTN logo |