Foundations

Theme

Colour roles

background.primary
background.secondary
surface.primary
surface.elevated
surface.pressed
surface.accent
action.primary
action.destructive
status.success
status.warning
status.danger
status.info
status.neutral

Contrast (WCAG)

Defined in src/dev/contrastPairs.ts and enforced by npm test.
Primary text on background
16.0:1 AAA
Primary text on background (secondary)
14.9:1 AAA
Primary text on surface
17.0:1 AAA
Primary text on elevated surface
17.0:1 AAA
Secondary text on background
6.6:1 AA
Secondary text on surface
7.0:1 AA
Secondary text on elevated surface
7.0:1 AA
Link on surface
6.6:1 AA
Link on background
6.2:1 AA
Secondary icon on pressed surface (chevron)
6.3:1 UI ✓
Action label on primary
6.6:1 AA
Action label on primary (pressed)
9.0:1 AAA
Inverse text on primary action
6.6:1 AA
Label on destructive action
7.2:1 AAA
Label on destructive action (pressed)
13.5:1 AAA
Text on subtle action tint
10.2:1 AAA
Action as text on surface
6.6:1 AA
Success on its tint
6.8:1 AA
Success on surface
7.4:1 AAA
Warning on its tint
6.5:1 AA
Warning on surface
7.1:1 AAA
Danger on its tint
6.3:1 AA
Danger on surface
7.2:1 AAA
Info on its tint
8.1:1 AAA
Info on surface
9.0:1 AAA
Neutral on its tint
8.6:1 AAA
Neutral on surface
9.8:1 AAA
Input border on surface
4.5:1 UI ✓
Focus ring on surface
6.6:1 UI ✓
Focus ring on background
6.2:1 UI ✓
Action label on subtle tint (pressed secondary button)
6.0:1 AA
Secondary text on background (secondary)
6.1:1 AA
Link on background (secondary)
5.8:1 AA
Success on background (secondary)
6.5:1 AA
Danger on background (secondary)
6.3:1 AA
Warning on background (secondary)
6.2:1 AA
Progress and chart fill on track
5.8:1 UI ✓
Link on accent surface (avatar initials)
6.0:1 AA
Primary text on pressed surface
15.4:1 AAA
Secondary text on pressed surface
6.3:1 AA
Success on pressed surface
6.7:1 AA
Success on background
7.0:1 AA
Danger on background (input errors)
6.8:1 AA
Success on elevated surface
7.4:1 AAA
Danger on elevated surface
7.2:1 AAA
Link on elevated surface
6.6:1 AA
Icon (link) on accent surface
6.0:1 UI ✓
Input border on background
4.3:1 UI ✓
Secondary button border on background
6.2:1 UI ✓
Focus ring on elevated surface
6.6:1 UI ✓
Tertiary button label on background
6.2:1 AA
Tertiary button label on elevated surface
6.6:1 AA
Primary action fill on background
6.2:1 UI ✓
Destructive fill on background
6.8:1 UI ✓
AI label text on page background
8.3:1 AAA
AI label text on surface
8.8:1 AAA
AI label text on elevated surface
8.8:1 AAA
AI label text on its tint
7.9:1 AAA
Text on AI tint
10.2:1 AAA
Primary text on AI tint
15.3:1 AAA
Secondary text on AI tint
6.3:1 AA
AI border on page background
6.3:1 UI ✓
AI border on surface
6.7:1 UI ✓
Link on AI tint
5.9:1 AA
Action label on AI tint
5.9:1 AA
Focus ring on AI tint
5.9:1 UI ✓
Success on AI tint
6.7:1 AA
Danger on AI tint
6.5:1 AA
Confidence high on its tint
6.8:1 AA
Confidence high on surface
7.4:1 AAA
Confidence medium on its tint
8.1:1 AAA
Confidence medium on surface
9.0:1 AAA
Confidence low on its tint
6.5:1 AA
Confidence low on surface
7.1:1 AAA
Confidence high on AI tint
6.7:1 AA
Confidence medium on AI tint
8.1:1 AAA
Confidence low on AI tint
6.3:1 AA
Action on success tint
6.1:1 AA
Action on warning tint
6.0:1 AA
Action on danger tint
5.8:1 AA
Action on info tint
6.0:1 AA
Action on neutral tint
5.8:1 AA
Link on success tint
6.1:1 AA
Focus ring on warning tint
6.0:1 UI ✓
Focus ring on danger tint
5.8:1 UI ✓
Secondary button border on tints (danger)
5.8:1 UI ✓

Typography

display · 36/44 · 700
Your balance is safe
heading1 · 28/34 · 700

Your balance is safe

heading2 · 22/28 · 600

Your balance is safe

heading3 · 18/24 · 600

Your balance is safe

body · 16/24 · 400
Your balance is safe
bodyStrong · 16/24 · 600
Your balance is safe
bodySmall · 14/20 · 400
Your balance is safe
label · 14/20 · 600
Your balance is safe
caption · 12/16 · 500
Your balance is safe
code · 14/20 · 400
Your balance is safe
moneyLarge · 36/44 · 700
$12,480.50 (see MoneyText)
money · 16/24 · 600
$12,480.50 (see MoneyText)

Spacing

space[0] 0
space[1] 4
space[2] 8
space[3] 12
space[4] 16
space[5] 20
space[6] 24
space[8] 32
space[10] 40
space[12] 48
space[16] 64

Radius and elevation

Radius values follow the style: Soft is rounder. Elevation is Clean's shadow scale.
none
sm
md
lg
xl
full
none
low
medium
high

Depth roles

Components ask for a role; the style (Clean or Soft) decides how it looks. Switch style above to compare.
flat
surface
Cards, rows, panels
floating
Elevated cards, menus, sheets
flat
control
Secondary buttons, chips, segments
flat
field
Inputs and tracks
no change
pressed
Any control while pressed or selected