Skip to main content

Guide

Design tokens in practice

How we structure color, type, spacing, and motion tokens for Tailwind v4 projects.

KoustavMarch 8, 20267 min readDesign

Design tokens are the contract between design and engineering. Here's how we structure them for Tailwind v4 projects.

The four layers

Primitive tokens: raw values (color scales, spacing scale)

Semantic tokens: --background, --foreground, --primary

Component tokens: button radius, card padding (rarely needed)

Utility classes: ds-display, ds-headline for one-off patterns

Color

We use OKLCH for perceptual uniformity. Each mode (light/dark) gets its own semantic mapping. Never copy-paste hex values between modes.

Typography

Three roles: display (Instrument Serif), body (Geist Sans), mono (Geist Mono). Size scale stays tight. 5–6 sizes cover 95% of UI.

Motion

Define duration and easing tokens once. Respect prefers-reduced-motion everywhere.

Want this built for you?

Fixed-scope MVP sprints and AI integrations. Same stack as this guide.