Semantic tokens
Named by role
Components use meaning — surface, accent, liquid ease — not raw greys. Themes remap values; names stay. Toggle light / dark to see roles shift.
Colour
Reference → semantic → shadcn aliases. Prefer the middle tier in components.
Canvas
Page background
--color-bg-canvas
bg-canvasStage
Playground behind demos
--color-bg-stage
bg-stageSurface
Raised planes
--color-bg-surface
bg-surface- Aa
Foreground
Primary ink
--color-fg-default
text-foreground - Aa
Muted
Secondary copy
--color-fg-muted
text-muted-foreground Brand
Brand solid / CTA
--color-brand
bg-primaryFocus
Keyboard + selection
--color-border-focus
ring / text-focusDanger
Destructive only
--color-danger
text-destructive
Size
Stage buttons share control md. Values follow the theme and density you pick.
Control sm
32px
Control md
40px
Control lg
48px
Shape
Control
14px
Container
22px
Container lg
28px
Pill
999px
Motion
Each curve runs with its own duration token. Calm swaps springs for ease-out; still and reduced motion remove the movement.
- Out--ease-out · Most enters and state changes
- Bounce--ease-bounce · Small rewards: checks, pops
- Liquid--ease-liquid · Goo and morphs
- Spring snappy--spring-snappy · Pills, highlights, reorders
- Spring bouncy--spring-bouncy · Playful moments
- Spring soft--spring-soft · Large surfaces
Contrast
The lowest ratio for each colour across canvas, surfaces and stage (for Glass, over the worst spot of its colour field), from npm run check:contrast. The build fails below the minimum.
| Colour | Minimal | Minimal dark | Glass | Glass dark | Expressive | Expressive dark | Paper | Paper dark | Minimum |
|---|---|---|---|---|---|---|---|---|---|
| fg-default | 14.31:1 | 17.31:1 | 14.31:1 | 16.40:1 | 14.31:1 | 16.11:1 | 14.31:1 | 16.90:1 | 4.5:1 |
| fg-muted | 6.14:1 | 6.01:1 | 6.14:1 | 5.69:1 | 6.14:1 | 5.59:1 | 6.14:1 | 5.87:1 | 4.5:1 |
| fg-subtle | 4.95:1 | 5.15:1 | 4.95:1 | 4.88:1 | 4.95:1 | 4.79:1 | 4.95:1 | 5.03:1 | 4.5:1 |
| danger-fg | 5.94:1 | 7.98:1 | 5.94:1 | 7.56:1 | 5.94:1 | 7.43:1 | 5.94:1 | 7.80:1 | 4.5:1 |
| success-fg | 5.09:1 | 9.80:1 | 5.09:1 | 9.29:1 | 5.09:1 | 9.12:1 | 5.09:1 | 9.57:1 | 4.5:1 |
| warning-fg | 5.08:1 | 9.80:1 | 5.08:1 | 9.29:1 | 5.08:1 | 9.12:1 | 5.08:1 | 9.57:1 | 4.5:1 |
| info-fg | 4.91:1 | 8.74:1 | 6.30:1 | 8.09:1 | 6.73:1 | 8.30:1 | 6.49:1 | 8.18:1 | 4.5:1 |
| fg-on-accent | 17.25:1 | 18.79:1 | 5.50:1 | 7.25:1 | 5.85:1 | 9.07:1 | 14.10:1 | 14.30:1 | 4.5:1 |
| border-focus | 3.23:1 | 7.06:1 | 4.68:1 | 6.12:1 | 4.98:1 | 6.96:1 | 5.25:1 | 6.54:1 | 3:1 |
| fg-disabled | 3.01:1 | 3.28:1 | 3.01:1 | 3.11:1 | 3.01:1 | 3.05:1 | 3.01:1 | 3.20:1 | 3:1 |
Foundation
Spacing
--space-1 … --space-32, then gap and inset roles
Layout
--layout-prose, content, dialog, sheet, toast, copy, note, study
Also
--color-liquid, --duration-dot, --type-micro-size, --duration-load, --duration-reward, --duration-bubble, --duration-success
Elevation
--elevation-0 … 4, overlay, press
Type
display, headline, title, body, label, caption, mono
Theme hooks
border, backdrop, texture, lift, press, shape
Use in code
/* CSS */ background: var(--color-brand); transition: transform var(--duration-medium) var(--ease-liquid); /* Tailwind */ className="h-control-md rounded-full bg-primary text-primary-foreground"
Source: styles/themes/minimal.css. Rules: DESIGN.md.