Spacing & Layout
A 4px base grid that scales consistently across every component, page, and screen size. Plus grid, breakpoints, elevation, and motion tokens.
Space Scale
Every spacing value is a multiple of 4px. Use the scale tokens — never raw px values.
Component Spacing
How spacing tokens map to real component anatomy — from Figma measurements.
Border Radius
Six radius tokens from sharp (sm) to fully round (full). Consistent application prevents visual noise.
Grid System
A 12-column grid with 24px gutters and responsive column counts per breakpoint.
12-column grid
Breakpoints
Six breakpoints follow industry-standard device widths. Mobile-first: design for xs, enhance upward.
| Name | Min Width | Columns | Gutter | Container | Target |
|---|---|---|---|---|---|
| xs | 0px | 4 | 16px | 100% | Small phones |
| sm | 640px | 6 | 20px | 620px | Large phones, portrait tablet |
| md | 768px | 8 | 24px | 740px | Tablets, landscape phone |
| lg | 1024px | 12 | 24px | 960px | Small desktops, large tablets |
| xl | 1280px | 12 | 32px | 1200px | Desktop, most common target |
| 2xl | 1536px | 12 | 40px | 1440px | Wide screens, ultrawide |
/* Mobile-first breakpoints */
@media (min-width: 640px) { /* sm */ }
@media (min-width: 768px) { /* md */ }
@media (min-width: 1024px) { /* lg */ }
@media (min-width: 1280px) { /* xl */ }
@media (min-width: 1536px) { /* 2xl */ }
/* Tailwind-style container */
.container {
width: 100%;
margin: 0 auto;
padding: 0 16px;
}
@media (min-width: 640px) { .container { max-width: 620px; padding: 0 20px; } }
@media (min-width: 1024px) { .container { max-width: 960px; padding: 0 24px; } }
@media (min-width: 1280px) { .container { max-width: 1200px; } }
Container Widths
Use max-width containers to keep content readable. Never let text lines exceed ~80 characters.
Elevation
Six elevation levels create depth through shadows. Higher elevation = more prominent. Hover a card to feel its shadow.
Motion Tokens
Duration and easing tokens for consistent, purposeful animation. Click the demo boxes to see each easing in action.
Usage Guidelines
All Tokens
:root {
/* Spacing scale (4px base grid) */
--space-0: 0px;
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 20px;
--space-6: 24px;
--space-7: 28px;
--space-8: 32px;
--space-10: 40px;
--space-12: 48px;
--space-16: 64px;
--space-20: 80px;
--space-24: 96px;
--space-32: 128px;
/* Border radius */
--radius-none: 0px;
--radius-sm: 4px;
--radius-md: 8px;
--radius-lg: 12px;
--radius-xl: 16px;
--radius-2xl: 24px;
--radius-card: 17px; /* Figma exact */
--radius-full: 9999px;
/* Elevation / Shadows */
--shadow-none: none;
--shadow-sm: 0 1px 3px rgba(0,0,0,.3);
--shadow-md: 0 4px 12px rgba(0,0,0,.3);
--shadow-lg: 0 8px 24px rgba(0,0,0,.4);
--shadow-xl: 0 16px 48px rgba(0,0,0,.5);
--shadow-purple: 0 4px 20px rgba(122,90,248,.35);
/* Z-index scale */
--z-below: -1;
--z-base: 0;
--z-raised: 10;
--z-dropdown: 100;
--z-sticky: 200;
--z-overlay: 300;
--z-modal: 400;
--z-toast: 500;
/* Motion */
--duration-fast: 100ms;
--duration-base: 200ms;
--duration-slow: 300ms;
--duration-slower: 500ms;
--ease-out: cubic-bezier(0, 0, 0.2, 1);
--ease-in: cubic-bezier(0.4, 0, 1, 1);
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}