Spacing
A 4px grid. Group tightly, separate generously, and let radii grow with size.
Nine steps
Where each goes
- Inside a panel
- 20px · 24px with screws
- Between panels in a dashboard
- 16px
- Between page sections
- 72–96px
- Parts in a tray
- 3–4px from the walls, 3px apart
- Label to its control
- 6px
Radii grow with size
Round only for switches and round keys. Layout is CSS grid; blocks respond to their container with container queries, pages to the viewport.
Words clear the corner
Where an edge bends, words start and end where the side runs straight, never in the bend. Text that runs within a radius of a box’s top or bottom keeps at least that radius from each side, so the box’s inline padding is never less than its radius. A pill keeps its words half its height from each end, out of the round ends. One token per radius holds that least padding:
- --tui-safe-s
- 4px · with --tui-r-s
- --tui-safe-m
- 7px · with --tui-r-m
- --tui-safe-l
- 12px · with --tui-r-l
- A pill
- half its height
.note { border-radius: var(--tui-r-l); padding: 6px max(var(--tui-2), var(--tui-safe-l)); }
.pill { height: 22px; border-radius: 999px; padding-inline: calc(22px / 2); }The full law
This page is a summary in plain words. The brain holds the law itself, written for an agent to follow.
The full law, with the foundations they rest on and the anti-patterns that break them. Full rules ship in the brain with the Pass.