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-canvas

  • Stage

    Playground behind demos

    --color-bg-stage
    bg-stage

  • Surface

    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-primary

  • Focus

    Keyboard + selection

    --color-border-focus
    ring / text-focus

  • Danger

    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.

ColourMinimalMinimal darkGlassGlass darkExpressiveExpressive darkPaperPaper darkMinimum
fg-default14.31:117.31:114.31:116.40:114.31:116.11:114.31:116.90:14.5:1
fg-muted6.14:16.01:16.14:15.69:16.14:15.59:16.14:15.87:14.5:1
fg-subtle4.95:15.15:14.95:14.88:14.95:14.79:14.95:15.03:14.5:1
danger-fg5.94:17.98:15.94:17.56:15.94:17.43:15.94:17.80:14.5:1
success-fg5.09:19.80:15.09:19.29:15.09:19.12:15.09:19.57:14.5:1
warning-fg5.08:19.80:15.08:19.29:15.08:19.12:15.08:19.57:14.5:1
info-fg4.91:18.74:16.30:18.09:16.73:18.30:16.49:18.18:14.5:1
fg-on-accent17.25:118.79:15.50:17.25:15.85:19.07:114.10:114.30:14.5:1
border-focus3.23:17.06:14.68:16.12:14.98:16.96:15.25:16.54:13:1
fg-disabled3.01:13.28:13.01:13.11:13.01:13.05:13.01:13.20:13: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.