Internal. Raw values named by what they are, not by what they are for. Only css/tokens/semantic.css may reference these. Base, layout, utility and component CSS must use semantic tokens instead; npm run lint:tokens enforces this.
Primitives are NOT public API: they may be renamed, added or removed in any release. Theme with semantic tokens.
Colors are OKLCH, in the sRGB gamut (CSS Color 4). On a Display P3 screen (@media (color-gamut: p3), at the end of this file) the accent solids (indigo 9 and 10) and the status solids (step 9) take more chroma: the sRGB chroma times how much further P3 reaches at that lightness and hue, so they are as saturated relative to P3 as they are to sRGB. Lightness and hue stay, so contrast stays; text steps (11 and 12) and neutrals do not change. W3C ok labMDN oklchMDN color-gamutW3C gamut mapping
Neutral and indigo each have 12 steps in light and in dark. The step number is the role, the same idea as Radix's scales (for comparison: 1 page, 2 raised, 3 sunken or element, 4 hover, 5 active or selected, 6 subtle border, 7 border, 8 control border, 9 solid, 10 solid hover, 11 muted or accent text, 12 text. Red, green, amber and blue have steps 3, 9 and 11 only. Purple, teal and yellow keep the code-highlight and mark hues. Our choice: the default is ivory paper and brown ink with a clay accent. The primary action uses neutral 12 (the ink); links, focus, checks and selection use clay. The neutral theme (css/themes/neutral.css) keeps the earlier achromatic look. Indigo stays as a primitive for themes such as calm. (radix-ui.com understanding the scale)
Ivory paper and brown ink. Hue 85 on the pale steps warms toward 45 on the ink, chroma 0.035 at most, so it reads as warm paper, not as a color. Our choice: step 2 (raised) is lighter than step 1 (page), so cards and panels sit on the page like brighter paper.
Token
Preview
Light
Dark
Description
--dui-color-neutral-1
oklch(96.6% 0.012 85deg)
oklch(96.6% 0.012 85deg)
Step 1, page: ivory
--dui-color-neutral-2
oklch(98.8% 0.006 85deg)
oklch(98.8% 0.006 85deg)
Step 2, raised: brighter paper for cards and panels
--dui-color-neutral-3
oklch(93.8% 0.014 82deg)
oklch(93.8% 0.014 82deg)
Step 3, sunken or element
--dui-color-neutral-4
oklch(92.4% 0.016 80deg)
oklch(92.4% 0.016 80deg)
Step 4, hover
--dui-color-neutral-5
oklch(89.8% 0.018 78deg)
oklch(89.8% 0.018 78deg)
Step 5, active or selected
--dui-color-neutral-6
oklch(86% 0.02 75deg)
oklch(86% 0.02 75deg)
Step 6, subtle border
--dui-color-neutral-7
oklch(80% 0.022 70deg)
oklch(80% 0.022 70deg)
Step 7, border
--dui-color-neutral-8
oklch(57% 0.03 60deg)
oklch(57% 0.03 60deg)
Step 8, control border, 3:1 on steps 1 to 3
--dui-color-neutral-9
oklch(50% 0.03 55deg)
oklch(50% 0.03 55deg)
Step 9, solid
--dui-color-neutral-10
oklch(45% 0.032 52deg)
oklch(45% 0.032 52deg)
Step 10, solid hover
--dui-color-neutral-11
oklch(49% 0.03 55deg)
oklch(49% 0.03 55deg)
Step 11, muted text, 4.5:1 on steps 1 to 5 and on status tints
--dui-color-neutral-12
oklch(28% 0.035 45deg)
oklch(28% 0.035 45deg)
Step 12, ink: text, and the light primary fill
--dui-color-neutral-12-a11
oklch(28% 0.035 45deg / 14%)
oklch(28% 0.035 45deg / 14%)
Hairline: the ink at 14% alpha
--dui-color-neutral-punctuation
oklch(37% 0.03 45deg)
oklch(37% 0.03 45deg)
Code punctuation, darker than muted text
--dui-color-neutral-shadow
oklch(30% 0.04 45deg / 10%)
oklch(30% 0.04 45deg / 10%)
Shadow: warm brown at 10%
Neutral, dark
Brown-black paper and ivory ink. Lightness rises with the step.
Token
Preview
Light
Dark
Description
--dui-color-neutral-dark-1
oklch(18.5% 0.012 55deg)
oklch(18.5% 0.012 55deg)
Step 1, page
--dui-color-neutral-dark-2
oklch(21.5% 0.014 55deg)
oklch(21.5% 0.014 55deg)
Step 2, raised
--dui-color-neutral-dark-3
oklch(22% 0.015 55deg)
oklch(22% 0.015 55deg)
Step 3, sunken or element
--dui-color-neutral-dark-4
oklch(27% 0.016 55deg)
oklch(27% 0.016 55deg)
Step 4, hover
--dui-color-neutral-dark-5
oklch(31% 0.018 55deg)
oklch(31% 0.018 55deg)
Step 5, active or selected
--dui-color-neutral-dark-6
oklch(35% 0.02 55deg)
oklch(35% 0.02 55deg)
Step 6, subtle border
--dui-color-neutral-dark-7
oklch(42% 0.022 58deg)
oklch(42% 0.022 58deg)
Step 7, border
--dui-color-neutral-dark-8
oklch(57% 0.025 60deg)
oklch(57% 0.025 60deg)
Step 8, control border, 3:1 on steps 1 to 3 and every elevation surface
--dui-color-neutral-dark-9
oklch(66% 0.022 65deg)
oklch(66% 0.022 65deg)
Step 9, solid
--dui-color-neutral-dark-10
oklch(71% 0.02 68deg)
oklch(71% 0.02 68deg)
Step 10, solid hover
--dui-color-neutral-dark-11
oklch(75% 0.02 70deg)
oklch(75% 0.02 70deg)
Step 11, muted text
--dui-color-neutral-dark-12
oklch(95% 0.012 85deg)
oklch(95% 0.012 85deg)
Step 12, ivory ink: text, and the dark primary fill
--dui-color-neutral-dark-12-a10
oklch(95% 0.012 85deg / 12%)
oklch(95% 0.012 85deg / 12%)
Hairline: the ink at 12% alpha
--dui-color-neutral-dark-punctuation
oklch(84% 0.015 75deg)
oklch(84% 0.015 75deg)
Code punctuation, lighter than muted text
--dui-color-neutral-dark-shadow
oklch(10% 0.02 45deg / 50%)
oklch(10% 0.02 45deg / 50%)
Shadow: near-black brown at 50%
--dui-color-neutral-dark-12-a6
oklch(95% 0.012 85deg / 6%)
oklch(95% 0.012 85deg / 6%)
Top highlight on raised dark surfaces: the ink at 6% alpha
Clay, the default accent. Hue 42. White text on it is 4.8
Step 9, solid With @media (color-gamut: p3): oklch(55% 0.214 27deg).
--dui-color-red-10
oklch(50% 0.19 27deg)
oklch(50% 0.19 27deg)
Step 10, danger fill behind white text (4.5:1), both schemes
--dui-color-red-11
oklch(48% 0.16 27deg)
oklch(48% 0.16 27deg)
Step 11, danger text
--dui-color-red-dark-3
oklch(28% 0.05 27deg)
oklch(28% 0.05 27deg)
Step 3, element tint
--dui-color-red-dark-9
oklch(65% 0.17 27deg)
oklch(65% 0.17 27deg)
Step 9, solid With @media (color-gamut: p3): oklch(65% 0.215 27deg).
--dui-color-red-dark-11
oklch(80% 0.114 27deg)
oklch(80% 0.114 27deg)
Step 11, danger text
Green. Steps 3, 9 and 11. Hue 150
Token
Preview
Light
Dark
Description
--dui-color-green-3
oklch(96% 0.018 150deg)
oklch(96% 0.018 150deg)
Step 3, element tint
--dui-color-green-9
oklch(55% 0.14 150deg)
oklch(55% 0.14 150deg)
Step 9, solid With @media (color-gamut: p3): oklch(55% 0.195 150deg).
--dui-color-green-11
oklch(47% 0.128 150deg)
oklch(47% 0.128 150deg)
Step 11, success text
--dui-color-green-dark-3
oklch(28% 0.04 150deg)
oklch(28% 0.04 150deg)
Step 3, element tint
--dui-color-green-dark-9
oklch(68% 0.14 150deg)
oklch(68% 0.14 150deg)
Step 9, solid With @media (color-gamut: p3): oklch(68% 0.195 150deg).
--dui-color-green-dark-11
oklch(80% 0.12 150deg)
oklch(80% 0.12 150deg)
Step 11, success text
Amber. Steps 3, 9 and 11. Hue 75
Token
Preview
Light
Dark
Description
--dui-color-amber-3
oklch(96.5% 0.02 75deg)
oklch(96.5% 0.02 75deg)
Step 3, element tint
--dui-color-amber-9
oklch(62% 0.12 75deg)
oklch(62% 0.12 75deg)
Step 9, solid With @media (color-gamut: p3): oklch(62% 0.138 75deg).
--dui-color-amber-11
oklch(47% 0.098 75deg)
oklch(47% 0.098 75deg)
Step 11, warning text
--dui-color-amber-dark-3
oklch(30% 0.04 75deg)
oklch(30% 0.04 75deg)
Step 3, element tint
--dui-color-amber-dark-9
oklch(72% 0.12 75deg)
oklch(72% 0.12 75deg)
Step 9, solid With @media (color-gamut: p3): oklch(72% 0.138 75deg).
--dui-color-amber-dark-11
oklch(80% 0.12 75deg)
oklch(80% 0.12 75deg)
Step 11, warning text
Blue, for info, separate from the indigo accent. Hue 245
Token
Preview
Light
Dark
Description
--dui-color-blue-3
oklch(96% 0.014 245deg)
oklch(96% 0.014 245deg)
Step 3, element tint
--dui-color-blue-9
oklch(55% 0.135 245deg)
oklch(55% 0.135 245deg)
Step 9, solid With @media (color-gamut: p3): oklch(55% 0.175 245deg).
--dui-color-blue-11
oklch(48% 0.12 245deg)
oklch(48% 0.12 245deg)
Step 11, info text
--dui-color-blue-dark-3
oklch(28% 0.04 245deg)
oklch(28% 0.04 245deg)
Step 3, element tint
--dui-color-blue-dark-9
oklch(68% 0.12 245deg)
oklch(68% 0.12 245deg)
Step 9, solid With @media (color-gamut: p3): oklch(68% 0.137 245deg).
--dui-color-blue-dark-11
oklch(80% 0.108 245deg)
oklch(80% 0.108 245deg)
Step 11, info text
Code-highlight hues that are not a status color, and the mark fill
Token
Preview
Light
Dark
Description
--dui-color-purple-11
oklch(46.2% 0.195 299deg)
oklch(46.2% 0.195 299deg)
Visited links and code keywords, light
--dui-color-purple-dark-11
oklch(80.1% 0.127 306deg)
oklch(80.1% 0.127 306deg)
Visited links and code keywords, dark
--dui-color-teal-11
oklch(49.1% 0.081 203deg)
oklch(49.1% 0.081 203deg)
Code properties, light
--dui-color-teal-dark-11
oklch(77.3% 0.099 203deg)
oklch(77.3% 0.099 203deg)
Code properties, dark
--dui-color-yellow-3
oklch(95.3% 0.093 99deg)
oklch(95.3% 0.093 99deg)
Mark background, light
--dui-color-yellow-dark-9
oklch(83.4% 0.141 97deg)
oklch(83.4% 0.141 97deg)
Mark background, dark
White, and black scrims
Token
Preview
Light
Dark
Description
--dui-color-white
oklch(100% 0 0deg)
oklch(100% 0 0deg)
White, for text on a solid fill
--dui-color-black-a40
oklch(0% 0 0deg / 40%)
oklch(0% 0 0deg / 40%)
Scrim, 40% black
--dui-color-black-a60
oklch(0% 0 0deg / 60%)
oklch(0% 0 0deg / 60%)
Scrim, 60% black
Font stacks
System fonts only, no downloads. The system-ui stack names the platform UI faces before the generic, so engines without system-ui (or with a poor mapping on Linux) still get a good face. Stacks follow https://modernfontstacks.com/.
Font sizes. Productive steps (interface text and small headings) are fixed; expressive steps 3 to 5 (page titles and display headings) grow with the viewport between 320px and 1280px with clamp(). Every size is in rem, so text follows the user's font size (WCAG 1.4.4). https://developer.mozilla.org/en-US/docs/Web/CSS/clamp For comparison: Carbon's productive and expressive type sets (https://carbondesignsystem.com/elements/typography/overview/)
Token
Preview
Light
Dark
Description
--dui-font-size-0-75
Aa
0.75rem
0.75rem
12px: badges
--dui-font-size-0-875
Aa
0.875rem
0.875rem
14px: interface text
--dui-font-size-1
Aa
1rem
1rem
16px: body text
--dui-font-size-1-125
Aa
1.125rem
1.125rem
18px
--dui-font-size-1-375
Aa
1.375rem
1.375rem
22px
--dui-font-size-fluid-3
Aa
clamp(1.5rem, 1.375rem + 0.625vw, 1.875rem)
clamp(1.5rem, 1.375rem + 0.625vw, 1.875rem)
24px to 30px
--dui-font-size-fluid-4
Aa
clamp(1.75rem, 1.5417rem + 1.0417vw, 2.375rem)
clamp(1.75rem, 1.5417rem + 1.0417vw, 2.375rem)
28px to 38px
--dui-font-size-fluid-5
Aa
clamp(2rem, 1.6667rem + 1.6667vw, 3rem)
clamp(2rem, 1.6667rem + 1.6667vw, 3rem)
32px to 48px
--dui-font-size-fluid-6
Aa
clamp(2.5rem, 2rem + 2.5vw, 4rem)
clamp(2.5rem, 2rem + 2.5vw, 4rem)
40px to 64px
--dui-font-size-fluid-7
Aa
clamp(2.75rem, 2.0833rem + 3.3333vw, 4.75rem)
clamp(2.75rem, 2.0833rem + 3.3333vw, 4.75rem)
44px to 76px
--dui-font-size-relative-90
Aa
0.9em
0.9em
No description yet
Line heights and tracking
Token
Preview
Light
Dark
Description
--dui-leading-100
Aa
1
1
No description yet
--dui-leading-110
Aa
1.1
1.1
No description yet
--dui-leading-120
Aa
1.2
1.2
No description yet
--dui-leading-140
Aa
1.4
1.4
No description yet
--dui-leading-150
Aa
1.5
1.5
No description yet
--dui-tracking-tight
Aa
-0.02em
-0.02em
No description yet
--dui-tracking-tighter
Aa
-0.03em
-0.03em
No description yet
--dui-tracking-tightest
Aa
-0.045em
-0.045em
No description yet
--dui-tracking-normal
Aa
normal
normal
No description yet
Spacing
Rem, so it follows the user's font size setting.
Token
Preview
Light
Dark
Description
--dui-space-0
0
0
No description yet
--dui-space-1
0.125rem
0.125rem
No description yet
--dui-space-2
0.25rem
0.25rem
No description yet
--dui-space-3
0.5rem
0.5rem
No description yet
--dui-space-4
0.75rem
0.75rem
No description yet
--dui-space-5
1rem
1rem
No description yet
--dui-space-6
1.5rem
1.5rem
No description yet
--dui-space-7
2rem
2rem
No description yet
--dui-space-8
3rem
3rem
No description yet
--dui-space-9
4rem
4rem
No description yet
--dui-space-fluid-section
None
clamp(3rem, 2rem + 5vw, 6rem)
clamp(3rem, 2rem + 5vw, 6rem)
48px on a phone to 96px on a wide screen
Sizes
Token
Preview
Light
Dark
Description
--dui-size-1
1rem
1rem
No description yet
--dui-size-1-25
1.25rem
1.25rem
No description yet
--dui-size-1-75
1.75rem
1.75rem
No description yet
--dui-size-2
2rem
2rem
No description yet
--dui-size-2-25
2.25rem
2.25rem
No description yet
--dui-size-2-5
2.5rem
2.5rem
No description yet
--dui-size-2-75
2.75rem
2.75rem
No description yet
--dui-size-12
12rem
12rem
No description yet
--dui-size-3-25
3.25rem
3.25rem
No description yet
--dui-size-16
16rem
16rem
No description yet
--dui-size-20
20rem
20rem
No description yet
--dui-size-24
24rem
24rem
No description yet
--dui-size-60ch
60ch
60ch
No description yet
--dui-size-72
72rem
72rem
No description yet
--dui-size-100svh
None
100svh
100svh
The small viewport height: the viewport with the browser's toolbars shown
--dui-size-100vw
100vw
100vw
The window width, scrollbar included
Radii
Token
Preview
Light
Dark
Description
--dui-radius-0
0
0
No description yet
--dui-radius-1
0.125rem
0.125rem
No description yet
--dui-radius-1-5
0.25rem
0.25rem
4px: checkboxes
--dui-radius-2
0.5rem
0.5rem
8px: controls
--dui-radius-3
0.75rem
0.75rem
12px: surfaces
--dui-radius-round
999rem
999rem
No description yet
Angles
Token
Preview
Light
Dark
Description
--dui-angle-45
None
45deg
45deg
No description yet
Border widths
Token
Preview
Light
Dark
Description
--dui-border-1
1px
1px
No description yet
--dui-border-2
2px
2px
No description yet
--dui-border-3
3px
3px
No description yet
--dui-border-0
0px
0px
No width: a focus ring that hugs the edge. A length, not a bare 0, so it is valid inside calc() sums
--dui-border-4
0.25rem
0.25rem
No description yet
Underline metrics, relative to the font
Token
Preview
Light
Dark
Description
--dui-underline-offset-015em
None
0.15em
0.15em
No description yet
--dui-underline-1
None
0.0625em
0.0625em
No description yet
--dui-underline-2
None
0.125em
0.125em
No description yet
Motion
Token
Preview
Light
Dark
Description
--dui-duration-0
None
0s
0s
No description yet
--dui-duration-120
None
120ms
120ms
No description yet
--dui-duration-200
None
200ms
200ms
No description yet
--dui-duration-300
None
300ms
300ms
Long enough for a full-height drawer to travel its width
--dui-easing-ease-out
None
cubic-bezier(0.2, 0, 0, 1)
cubic-bezier(0.2, 0, 0, 1)
No description yet
--dui-easing-decelerate
None
cubic-bezier(0, 0, 0, 1)
cubic-bezier(0, 0, 0, 1)
Starts fast, settles gently: things arriving
--dui-easing-accelerate
None
cubic-bezier(0.3, 0, 1, 1)
cubic-bezier(0.3, 0, 1, 1)
Starts slowly, leaves fast: things departing
--dui-easing-linear
None
linear
linear
No description yet
A critically damped spring written with linear(): a fast start and a long, soft settle with no overshoot, so a drawer never pulls away from its edge. Browsers without linear() ignore it; the semantic token falls back to the enter easing (semantic.css). https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/easing-function/linear