Foundations
Layout
Layouts have names, not grid numbers, and spacing has roles, not pixel values. A screen says what sits side by side and what belongs together; the system turns that into columns and gaps.
Experience
What it looks like in use.
layout="main-aside"Content with its summary or facts: a case text, a form with what happens next.layout="halves"Two equal parts: before and after, two options.layout="thirds"Three equal parts: principles, short facts.layout="aside-main"A filter or index followed by the content it controls.layout="cards"A set people compare: as many columns of at least 280px as fit.Narrow the window: each one stacks once its own width drops below 640px, in reading order.
System
The logic and the rules behind it.
- Columns by name.
<Columns layout=…>is the only way to put content side by side. It splits at its own width, not the viewport's, so the same layout works in a page, a dialog or next to a sidebar.grid-cols-*andcol-span-*fail the lint in screens and patterns. - Spacing by role. Eight roles from
gap-inline-tighttogap-regionsay why two things are apart. They point at values of the four-pixel grid; there is no new value. Numeric gaps fail the lint in screens and patterns. - The parent owns the spacing. A block sets the gap between its children with flex or grid. Components never carry outer margins, so they fit wherever they are placed.
- Reading order is visual order. Columns stack in DOM order and are never reordered visually. The column that matters most comes first in the code.
- Two contexts, one system. Editorial pages (portfolio, showcase, slides) and product screens share every token. They differ in frame, rhythm and how much they may stand out:
| Rule | Editorial | Product |
|---|---|---|
| Frame | Site header, Section, Container | Application shell with regions |
| Page head | PageHead lg; display-xl and display-lg allowed | PageHead md; display-md at most |
| Vertical rhythm | Section tokens (128 / 96, 56 on mobile) | region and group |
| Surfaces | One ink and one terracotta area per page | Ink only in the shell header; no terracotta |
| Density | Standard | Standard; Table may be compact |
Specifications
Every value, as tokens and utilities.
- An icon and its text.
gap-inline-tightspacing.inlineTight · 4px - Controls in a row: buttons, chips, page actions.
gap-inlinespacing.inline · 12px - An eyebrow or tag and the Heading it labels; above a Display title, stack.
gap-labelspacing.label · 12px - Inside one unit: label, hint and control; a title and its meta.
gap-stack-tightspacing.stackTight · 8px - The parts of a block: heading and text, text and actions.
gap-stackspacing.stack · 16px - Peers in a list: fields of a form, steps, items in a column.
gap-stack-relaxedspacing.stackRelaxed · 24px - Groups and columns; the same as card.padding.
gap-groupspacing.group · 32px - Regions of a product screen: head, toolbar, content.
gap-regionspacing.region · 48px
Breakpoints of Columns
| Token | Value | Use |
|---|---|---|
| layout.columns | 640px | Container width at which Columns splits (container query @columns). |
| layout.cardMin | 280px | Smallest card column in layout="cards". |