Spacing and density
Spacing runs on a 4 px base. Component padding lives on 4, 8, 12, 16 and 20. Use the scale; a value that is not on it is a defect.
| Token | CSS variable | Value |
|---|---|---|
ui. | - | 0px |
ui. | - | 4px |
ui. | - | 8px |
ui. | - | 12px |
ui. | - | 16px |
ui. | - | 20px |
ui. | - | 24px |
ui. | - | 32px |
ui. | - | 40px |
ui. | - | 48px |
ui. | - | 64px |
ui. | - | 80px |
ui. | - | 96px |
ui. | - | 128px |
ui. | - | 168px |
ui. | - | 2px |
ui. | - | clamp(96px, 5rem + 5vw, 168px) |
ui. | - | clamp(40px, 2rem + 4vw, 104px) |
Density
Section titled “Density”comfortable is the default and is what marketing and docs use. compact is for tables and the app shell; set data-density="compact" on the root, and every token below changes. Coarse pointers keep targets of at least 44 px.
| Token | CSS variable | Comfortable | Compact |
|---|---|---|---|
ui. | - | 40px | 32px |
ui. | - | 36px | 28px |
ui. | - | 12px | 8px |
ui. | - | 8px | 4px |
ui. | - | 32px | 28px |
ui. | - | 16px | 12px |
- Owner
- Okrado founders
- Updated
- Review by
- Markdown version
- /foundations/spacing.md