Tokens: the Theme global
Never write colours, font sizes, radii or durations as literals: use these. The colours are written by
apply! from the wallpaper.
Colours
| Token | Use |
|---|---|
accent, on-accent | primary actions, selection; text/icons on accent |
accent-soft | selected rows, soft highlights |
background | window background |
surface, surface-high | groups and cards; raised fields |
text, text-dim, text-faint | body text; secondary; hints and disabled |
outline | dividers, field borders |
pressed | the pressed overlay |
danger, on-danger | destructive actions |
scrim | behind popups and dialogs |
glass-tint, glass-edge, wallpaper-dim | over the wallpaper |
dark | whether the scheme is dark |
Type
font is Inter. Sizes scale with the user's text size (text-scale, 1.0–1.9):
| Token | Base size | Use |
|---|---|---|
caption | 12 | footers, small labels |
body | 15 | rows, text |
headline | 18 | group titles |
title | 24 | page titles (scales half as fast) |
display | 64 | the clock (scales half as fast) |
Shape and spacing
| Token | Value |
|---|---|
radius-card, radius-group, radius-input | 28, 20, 14 px |
gap, pad, pad-page | 8, 16, 32 px |
row | row height, ≥ 56 px, grows with the text |
touch | 48 px, the minimum touch target |
icon | 24 px |
Motion
fast 120 ms, normal 240 ms, slow 380 ms; all 0 when animations is off. Motion.page is the page push.
Form factor and screen
| Token | Tab | TV |
|---|---|---|
tv | false | true |
safe-x, safe-y | 0, 0 | 64, 40 (overscan) |
window-pad-x, -top, -bottom | 24, 32, 24 | 64, 40, 40 |
focus-margin | 48 | 72 (kept visible around the focused element) |
focus-ink, focus-on-ink, focus-fill, focus-inset | focus visuals | |
lift-button, lift-icon, lift-tile, lift-card | 1.06, 1.1, 1.1, 1.05 (TV only) | |
screen-width, screen-height | the screen | |
keyboard-x/y/w/h | where the on-screen keyboard is (0 when hidden) | |
wallpaper, wallpaper-blur | the wallpaper images |
Icons
Icon.<name> holds Material Symbols (rounded) as images: Image { source: Icon.wifi; colorize: Theme.text; }.
Available: add, alarm, arrow-back, bluetooth, calendar-month, cast, chat, check, chevron-right,
close, delete, home, info, keyboard, language, lock, mic, more-vert, palette, refresh,
search, settings, timer, tune, visibility, volume-up, wallpaper, warning, wifi and more: see
libs/theme/slint/icons.slint. How to add one is in the repository README ("icon regeneration").