Foundations
Foundations
The package has 400 tokens in three layers: 126 primitives, 151 semantic tokens and 123 component tokens. These pages show the semantic layer, the one you write CSS against, with values for the brand this site wears.
Foundation pages
- ColorSurfaces, text, accent, borders and feedback, light and dark.48 tokens
- SpacingGaps and padding, named by what they separate.19 tokens
- TypographyThe type scale, families, weights and line heights.40 tokens
- MotionDurations and easing curves, with a demo.7 tokens
Other tokens
The semantic tokens that don’t need a page of their own. None of them change between light and dark.
Radius
Corner rounding by role: components, interactive controls, images and pills.
| Token | Value | Used by |
|---|---|---|
--border-radius-component | 12px0px24px | Alert, Card, CommandPalette, Dialog and 21 more |
--border-radius-interactive | 12px2px9999px | Alert, Dialog, Drawer, Menu and 24 more |
--border-radius-image | 0.75rem0px24px | Card, AspectRatio, Image |
--border-radius-pill | 9999px9999px9999px | MobileNav, Stepper, Avatar, Badge and 10 more |
Border width
The default border and the border on interactive controls.
| Token | Value | Used by |
|---|---|---|
--border-width-interactive | 1px1px1px | Menu, NavigationMenu, Popover, ChatComposer and 13 more |
--border-width-default | 1px2px1px | Alert, Card, CommandPalette, Dialog and 29 more |
Shadow
Elevation by component: cards, dropdowns, dialogs and toasts.
| Token | Value | Used by |
|---|---|---|
--shadow-card | 0 1px 2px 0 rgba(0,0,0,0.05)none0 1px 2px 0 rgba(36,31,58,0.06), 0 8px 24px 0 rgba(36,31,58,0.08) | Card |
--shadow-card-hover | 0 1px 3px 0 rgba(0,0,0,0.10), 0 1px 2px -1px rgba(0,0,0,0.10)none0 2px 4px 0 rgba(36,31,58,0.08), 0 12px 32px 0 rgba(36,31,58,0.10) | Card |
--shadow-dropdown | 0 4px 6px -1px rgba(0,0,0,0.10), 0 2px 4px -2px rgba(0,0,0,0.10)0 4px 6px -1px rgba(0,0,0,0.10), 0 2px 4px -2px rgba(0,0,0,0.10)0 4px 6px -1px rgba(0,0,0,0.10), 0 2px 4px -2px rgba(0,0,0,0.10) | CommandPalette, Menu, NavigationMenu, Popover and 3 more |
--shadow-dialog | 0 4px 6px -1px rgba(0,0,0,0.10), 0 2px 4px -2px rgba(0,0,0,0.10)0 4px 6px -1px rgba(0,0,0,0.10), 0 2px 4px -2px rgba(0,0,0,0.10)0 4px 6px -1px rgba(0,0,0,0.10), 0 2px 4px -2px rgba(0,0,0,0.10) | Drawer |
--shadow-toast | 0 10px 15px -3px rgba(0,0,0,0.10), 0 4px 6px -4px rgba(0,0,0,0.10)0 10px 15px -3px rgba(0,0,0,0.10), 0 4px 6px -4px rgba(0,0,0,0.10)0 10px 15px -3px rgba(0,0,0,0.10), 0 4px 6px -4px rgba(0,0,0,0.10) | Toast, Tooltip |
Size
The focus ring, icon sizes, the default dialog width and the container widths for text, media and pages.
| Token | Value | Used by |
|---|---|---|
--focus-ring-width | 2px2px2px | Alert, Card, Dialog, Drawer and 44 more |
--focus-ring-offset | 4px4px4px | Alert, Card, Dialog, Drawer and 32 more |
--size-icon-xs | 12px12px12px | Icon, Link, SelectableCard, Tag |
--size-icon-sm | 16px16px16px | CommandPalette, Menu, NavigationMenu, SideNav and 7 more |
--size-icon-md | 20px20px20px | Alert, CommandPalette, Toast, Accordion and 12 more |
--size-icon-lg | 24px24px24px | FileUpload, Icon, Image, Spinner |
--size-icon-xl | 32px32px32px | Icon |
--size-dialog-default | 560px560px560px | — |
--size-container-text | 45rem45rem45rem | ChatMessage, FormLayout, Markdown, PromptForm and 1 more |
--size-container-media | 60rem60rem60rem | Section |
--size-container-wide | 80rem80rem80rem | Section |
--size-container-page | 90rem90rem90rem | Section |
--size-container-site | 90vw90vw90vw | — |
Opacity
The overlay behind a dialog, and disabled controls.
| Token | Value | Used by |
|---|---|---|
--opacity-overlay | 0.30.30.3 | — |
--opacity-disabled | 0.10.10.1 | — |
Z-index
Stacking order, lowest to highest. The skip link sits above everything.
| Token | Value | Used by |
|---|---|---|
--z-sticky | 100100100 | MobileNav, TopNav |
--z-dropdown | 200200200 | NavigationMenu |
--z-overlay | 300300300 | CommandPalette, Dialog, Drawer, Lightbox and 3 more |
--z-modal | 400400400 | — |
--z-toast | 500500500 | Toast |
--z-tooltip | 600600600 | Tooltip |
--z-skip-link | 700700700 | SkipLink |
How the tokens are layered
Primitives are raw values: a gray ramp, a 4px spacing step. Components never use them; the linter fails the build if one does. Semantic tokens name a role, like --color-text-secondary or --space-element-gap, and point at a primitive. A brand or dark mode changes what they point at. Component tokens name one component’s decisions, like --button-padding-x, and are listed on each component’s page.
Every token, primitives included, with all four resolved values, is in tokens.json.