FoundationsOverview
Tokens are the system. Components are proof.
Every component on this site is built from the tokens in this section. If a value is hard-coded inside a component, it is a bug. If a value isn't in this section, it shouldn't be in the codebase.
Why foundations, why first
A design system without a foundation is a component library. Component libraries make it easy to copy a button. Design systems make it easy to make a button you've never made before. The difference is the foundation.
The tokens below are the fewest possible decisions that get us 100% of the way. Adding a new token is a 30-day commitment; if it can't be defended in 30 days, it doesn't get a token.
The four foundations principles
- Semantic, not numeric. We name tokens by what they mean (
--foreground,--surface-elevated), not what they look like (--gray-900). The same token can change its value at any time without breaking the contract. - Fewer is more. Eight color tokens, three radii, two shadows. If a new value is needed, the right answer is usually to use the nearest existing token.
- One source of truth. Tokens live in
app/globals.css. Components consume them via Tailwind's@theme inline. There is no inline color, no inline font size, no inline shadow anywhere else. - Document the tradeoffs. A token without a reason is a guess. Every page in this section ends with "Why this value" because the next contributor needs the argument, not the answer.
The eleven foundation pages
The full map. Each page is short on purpose.
Five roles, eight tokens, two surface levels.
TypographyOne serif, one sans, four display sizes, six body sizes.
SpacingA 0.5 rem base scale with explicit naming, not Tailwind's numeric classes.
RadiusThree radii. 2 / 4 / 6 px. Never anything else.
ElevationThree shadows. A flat baseline, an elevated panel, an overlay.
MotionOne ease. Two durations. Respect prefers-reduced-motion everywhere.
Iconography1.5 stroke. Lucide. Twenty-eight icons in the public set.
Borders & linesTwo line tokens. Subtle (8% ink) and strong (16% ink).
Layout primitivesA 90 rem max canvas. Three breakpoints. Five shells.
GridA 12-column, 24 px-gutter grid on mobile, 8-col on tablet, 12-col again on desktop.