Spacing & scale
A 4px base unit drives the spacing scale. Gaps between blocks come from named rungs that say what the two blocks are to each other, not from a number.
Rhythm
Pick a rung by what two blocks are to each other. Read it live, as Stack’s gap prop or gap-(--spacing-rhythm-*). A numbered class like gap-10 freezes the length at build time, so a theme can no longer move it.
On a screen
A settings screen built from kit parts, with every gap marked by the rung that sets it.
Settings
Your profile and your plan.
Profile
How your team sees you.
Jane Doe
jane@example.com
Shown on comments and invites.
Plan
Pro, billed yearly.
Seats reset on 1 December.
All rungs
Every rung, including the ones this screen does not use.
Scale
The 4px scale for insets. All spacing derives from --spacing: 0.25rem (4px). Bars scale in proportion to value.
Widths
How wide things get: panels, the page, a line of text, and the screen sizes the layout answers to.
Widths and chrome
Width caps for panels, columns and the full page. The header and footer share one width and one side padding, so anything lined up with them lines up with the page edge. Bars show widths, in proportion to value.
Reading measure
Line length governs reading rhythm. Caps are measured in ch, so a single value holds at every type tier. You may go narrower than a measure, never wider. Bars scale against 60ch.
Headings break into lines rather than stretch across the page.
Body copy holds a 60 character measure so the eye returns to a predictable left edge on every line. Long lines tire the eye; short ones fragment the thought. The measure is set in ch, so the physical width tracks the type size without a separate cap per tier.
Vertical rhythm
The prose-flow utility spaces long-form text. A heading gets more space above than below, so it belongs to what follows. An h2 or h3 takes only the 16px floor below; an h1 takes 40px. A table or code block has its own steps. Bars scale in proportion to value.
Trigger conditions
Each contract specifies a trigger event tied to an objective public source. The gap above this heading is large; the gap below it is the 16px floor, so the heading reads as the start of this block.
Event definition
The trigger event is a measurable condition with a single binary outcome. Sub-headings take a smaller gap above than the section heading, keeping the hierarchy legible through spacing alone.
A second paragraph sits one floor-gap (16px) below the first. Body blocks never crowd and never drift.
Breakpoints
Mobile-first responsive breakpoints. Tailwind defaults, applied as min-width media queries. Bars scale in proportion to value.
Shape and depth
Corners, shadows and stacking order.
Border radius
A progressive scale from subtle rounding to fully circular. Each level has a defined usage.
xs
0.25rem
Close buttons, micro elements
sm
0.375rem
Checkbox, small controls
md (default)
0.5rem
Menu items, Popover, Tooltip
lg
0.75rem
Cards, dialogs, menu popups
xl
1rem
Drawers, sheets, large panels
2xl
1.25rem
Unassigned
3xl
1.5rem
Unassigned
4xl
2rem
Unassigned
full
9999px
Badges, pills, switches
action-xs
0.5625rem
Controls 24px tall
action-sm
0.65625rem
Controls 28px tall
action
0.75rem
Controls 32px tall
action-lg
0.9375rem
Controls 40px tall
action-xl
1.03125rem
Controls 44px tall (touch)
Shadow scale
Seven shadow tokens, from form control depth to modal lift. shadow-ring-flat is an edge with no lift. A Card with variant muted has no ring or shadow, only a fill.
shadow-ring-flat
An edge with no lift (Alert, Badge)
shadow-xs
Form controls (Input, Select, Checkbox) and Table
shadow-sm
Subtle elevation
shadow-ring-mddefault
Cards, popovers, menus, drawers
shadow-md
Plain drop shadow (inverted Tooltip)
shadow-lg
Heavy drop shadow
shadow-ring-lg
Modals, dialogs
Z-index scale
Four rungs, no named tokens. Every overlay shares z-50 on purpose: Base UI portals them to the body in mount order, so the last one opened wins. That is what lets a Select inside a Dialog sit above it, and a Dialog opened from a menu sit above the menu. Never give an overlay its own z-index.