Tokens Starter
A minimal set of design tokens for new projects. Copy this file as your foundation and customize the values to match your brand.
Overview
Design tokens are CSS custom properties that define your visual design language. This starter includes everything you need for a consistent design system:
- Size Scale - Consistent spacing from 2px to 64px
- Colors - Gray palette, brand colors, and semantic colors with automatic light/dark support
- Typography - Font stacks, sizes, and line heights
- Borders - Widths and border-radius values
- Shadows - Three elevation levels
- Motion - Durations and easing functions
Live Preview
See the tokens in action with color swatches, spacing samples, and typography examples.
Source Code
Copy this CSS to your project's tokens.css file.
Token Categories
Size Scale
The size scale uses a base unit of 0.25rem (4px at default font size) with named stops from 3xs to 3xl. Use these for all spacing, gaps, and sizing:
Colors
Colors use the OKLCH color space for perceptually uniform values. The light-dark() function automatically switches between light and dark mode values based on color-scheme:
Typography
Three font stacks are provided: sans-serif for UI, serif for content, and monospace for code. Combine with size and line-height tokens:
Borders and Shadows
Use border-radius tokens for consistent rounding and shadow tokens for elevation:
Motion
Duration and easing tokens ensure consistent animation timing:
Customization
To customize for your brand, override the hue variables:
For more extensive customization, override the specific color tokens directly.
Related
Tokens Reference
Full documentation of all design tokens
Layer Setup
CSS @layer configuration for cascade control
Dark Mode Toggle
Theme switching with data-mode attribute