Spacing

Spatial rhythm, border radius, and layering conventions that keep the interface consistent.

Base units

Two base units define the spatial rhythm. Components multiply these for padding, gaps, and margins.

Horizontal 0.5rem Padding, gaps, and margins along the inline axis
Vertical 0.5rem Padding, gaps, and margins along the block axis

Ramp

A mechanical ramp for one-off gaps. Reach for a role below first; use a ramp step only where no role fits.

0.125rem · 1.875px
0.25rem · 3.75px
0.5rem · 7.5px
0.75rem · 11.25px
1rem · 15px
1.5rem · 22.5px
2rem · 30px
3rem · 45px

Roles

The recurring gaps, each a step on the ramp, so one rhythm runs through every panel, list and table. Group with space and tone before reaching for a hairline: between the blocks of a panel, between panels.

0.75rem
Inside a panel or card, top and bottom
1rem
Inside a panel or card, sides
0.75rem
Between the blocks inside a panel
0.75rem
Between panels, and around the page
0.625rem
Between things on one line: chips, actions
0.5rem
A list or table row, top and bottom
0.75rem
A list or table row, sides
0.75rem
A button or chip, sides

Border radius

Control 0.375rem
Panel 0.75rem
Container 0.875rem

Elevation layers

Stacking order for overlapping surfaces. Higher layers sit above lower ones.

0 Document flow
1 Hover/active elevations
100 Sticky headers
200 Dropdowns, sidebar menus
900 Dialog backdrop
1000 Dialog content
1100 Floating UI inside modal
1200 Tooltips
1300 Notifications
1400 Onboarding takeover

Examples

The spacing roles in a panel
A panel
a row
a row
chip chip
Its neighbour
a row

Panel padding around a stack of rows, chips an inline gap apart, and a section gap to the next panel.