System
Spacing
Space is a scale of steps on a grid. Every padding, gap and margin takes one, so a page keeps its rhythm and a density context can tighten it in one place.
The scale
Plain spaces on an 8pt grid, 5 steps from 8px to 48px. Padding, gaps and margins take a step, never a number of their own.
- space-1 8px
- space-2 16px
- space-3 24px
- space-4 32px
- space-5 48px
In use
Larger steps hold larger things apart: the card's padding is space-3, its lines are space-2 apart, and the buttons sit space-1 from each other.
Dawn on the river
Twelve birds heard before the light came up.
Share
Density
Density is a context like theme. Under
data-density="compact" the same names give smaller values, so a dense table and a roomy form share one set of components.comfortable and compact
comfortable (default)
Dawn on the river
Twelve birds heard before the light came up.
Share
data-density="compact"
Dawn on the river
Twelve birds heard before the light came up.
Share
Scales in the registry
A system takes its scale from the space registry. Plain uses 8pt-comfortable; the others trade density for room in different steps.
5 scales
4pt-compact4 8 12 16 24 32 48
8pt-comfortable8 16 24 32 48 64 96
8pt-standard4 8 12 16 24 32 48 64
golden4 6 10 16 26 42 68
tailwind-aligned4 8 12 16 24 32 40 48 64