Spacing and radii
The spacing grid is based on --nw-space-1 (0.25rem). For example, --nw-space-2 is 0.5rem and --nw-space-4 is 1rem. Half steps use hyphens: --nw-space-1-5 is 0.375rem.
| Scale | Values |
|---|---|
--nw-radius-xs through --nw-radius-2xl |
2, 4, 8, 12, 16, and 24px |
--nw-radius-full |
Full rounding for pills and circles |
--nw-control-xs, -sm, -md, -lg |
1.75, 2, 2.5, and 3rem |
--nw-cut |
10px chamfer on the top-right and bottom-left corners |
Choose control size for the interaction, not the label length. Increase the target or give it more room on touch layouts rather than shrinking the text.
Compose spacing
Section titled “Compose spacing”Use nw-stack for vertical gaps and nw-cluster for controls that should wrap. For custom layouts, use the same space tokens:
.settings-actions { display: flex; flex-wrap: wrap; gap: var(--nw-space-3);}