Foundations
Design tokens
Stable87 tokens across 14 groups. Every sample below resolves its value through the live custom property, so this page cannot show a value that is no longer true.
Updated in v1.0.0
How the axes compose
Foundry separates three concerns that most systems collapse into one theme enum: scheme (light or dark), palette (accent ramp, display typeface, corner treatment) and density (control height and layout rhythm). All three are written to <html> as data attributes and read back by CSS, and all three compose — Corporate plus dark plus compact is a real, authored combination.
Because the selectors are attribute-based rather than :root-only, any subtree can opt into its own theme. That is exactly what the preview frames on every component page do, and what the playground uses.
Change one file, change everything
Surface colour
Backgrounds, from the warm page canvas up through raised cards and down into sunken wells. Authored separately for light and dark rather than inverted.
--color-canvasPage background. The warm off-white that defines Foundry.
--color-surfaceDefault panel and card background.
--color-surface-raisedPopovers, dropdowns, dialogs — anything floating.
--color-surface-sunkenWells, table headers, inset preview frames.
--color-surface-inverseInverted blocks such as dark CTA bands.
--color-code-surfaceCode viewer background, constant across schemes.
--color-code-gutterCode viewer line-number gutter.
Ink colour
Foreground text. Graphite rather than pure black in light mode; warm off-white rather than pure white in dark mode.
--color-ink-strongHeadings and emphasised numerals.
--color-inkBody copy.
--color-ink-mutedSecondary copy, descriptions, help text.
--color-ink-subtleMetadata, placeholders, disabled labels.
--color-ink-inverseText on inverted surfaces.
Accent colour
One accent ramp drives every primary action. Palettes swap the ramp wholesale, which is why switching palette visibly changes previews.
--color-accentPrimary actions, active navigation, focus ring.
--color-accent-hoverHover state for accent surfaces.
--color-accent-activePressed state for accent surfaces.
--color-accent-inkText placed on an accent fill.
--color-accent-softTinted background for badges and selected rows.
--color-accent-soft-inkText on a soft accent tint.
--color-accent-lineBorder for accent-tinted surfaces.
Status colour
Each status ships a trio — solid, soft surface and line. Status is never communicated by hue alone; an icon and a text label always accompany it.
--color-successConfirmations, healthy states, positive deltas.
--color-success-softSuccess alert and badge background.
--color-warningDegraded states and non-blocking problems.
--color-warning-softWarning alert and badge background.
--color-dangerDestructive actions, validation failures, outages.
--color-danger-softDanger alert and badge background.
--color-infoNeutral informational messaging.
--color-info-softInfo alert and badge background.
Border colour
Foundry leans on lines rather than shadows. Three weights cover almost every case.
--color-border-subtleInternal dividers inside a panel.
--color-borderDefault component and panel outline.
--color-border-strongEmphasised outline, hover borders, table rules.
Typography
A 1.2 modular scale anchored at a 15px base. The display family is palette-controlled: Editorial and Warm use a serif, the rest use the grotesque.
--text-2xsTechnical labels, uppercase eyebrows.
--text-xsTable metadata, badge text.
--text-smDense UI copy, sidebar navigation.
--text-baseBody copy default.
--text-mdLead paragraphs.
--text-lgCard titles, section subheads.
--text-xlSection headings.
--text-2xlPage headings.
--text-3xlSmall display.
--text-4xlDisplay.
--text-5xlHero display.
--text-6xlEditorial hero display.
Spacing
A 4px grid. Density multiplies the derived layout spacings, not this base scale.
--space-14px — icon nudges.
--space-28px — inline gaps.
--space-312px — control padding.
--space-416px — stack rhythm.
--space-624px — card padding.
--space-832px — block separation.
--space-1248px — sub-section separation.
--space-1664px — section padding.
--space-2496px — hero padding.
Radius
Corner treatment is a palette signature. Minimal squares everything off; Modern rounds generously.
--radius-xsFocus ring rounding, inline code.
--radius-smBadges, small inputs.
--radius-mdButtons, inputs, menu items.
--radius-lgCards and panels.
--radius-xlDialogs, feature cards.
--radius-fullAvatars, pills, switches.
Elevation
Shadows read as paper lifting off paper. Nothing glows. The Minimal palette flattens them to zero on purpose.
--shadow-xsHairline lift on hover.
--shadow-smResting cards.
--shadow-mdDropdowns and popovers.
--shadow-lgSticky headers over content.
--shadow-overlayDialogs and drawers.
Border width
Two widths only. The strong width marks focus and selected states.
--border-widthDefault 1px hairline.
--border-width-strong2px, for selection and focus emphasis.
Breakpoints
Five breakpoints, mirrored into the Tailwind theme so `md:` in a component and the documented value can never disagree.
--breakpoint-sm640px — large phone.
--breakpoint-md768px — tablet portrait.
--breakpoint-lg1024px — tablet landscape / small laptop.
--breakpoint-xl1280px — desktop.
--breakpoint-2xl1536px — wide desktop.
Motion
Short durations and a single standard easing. Every animation is disabled under `prefers-reduced-motion`.
--duration-instant80ms — colour and opacity changes.
--duration-fast140ms — hover and focus transitions.
--duration-normal220ms — overlay entrances.
--duration-slow360ms — drawer travel.
--ease-standardDefault easing for state changes.
--ease-entranceElements arriving on screen.
--ease-exitElements leaving the screen.
Density
Density is a separate axis from theme. It rescales control heights and layout rhythm without touching the type scale.
--density-control-heightDefault control height.
--density-control-height-smSmall control height.
--density-control-height-lgLarge control height.
--density-gapGap between adjacent controls.
--density-stackVertical rhythm inside forms and stacks.
--density-card-paddingCard interior padding.
--density-section-yVertical padding for marketing sections.
--density-row-heightTable and list row height.
Focus
One focus treatment for the entire library, applied through `:focus-visible` so pointer users never see it.
--focus-ring-widthOutline width of the focus ring.
--focus-ring-offsetGap between element and ring.
--focus-ring-colorRing colour — tracks the accent ramp.