Skip to content

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-* and col-span-* fail the lint in screens and patterns.
  • Spacing by role. Eight roles from gap-inline-tight to gap-region say 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:
Editorial and product context
RuleEditorialProduct
FrameSite header, Section, ContainerApplication shell with regions
Page headPageHead lg; display-xl and display-lg allowedPageHead md; display-md at most
Vertical rhythmSection tokens (128 / 96, 56 on mobile)region and group
SurfacesOne ink and one terracotta area per pageInk only in the shell header; no terracotta
DensityStandardStandard; Table may be compact

Specifications

Every value, as tokens and utilities.
  • gap-inline-tightspacing.inlineTight · 4px
    An icon and its text.
  • gap-inlinespacing.inline · 12px
    Controls in a row: buttons, chips, page actions.
  • gap-labelspacing.label · 12px
    An eyebrow or tag and the Heading it labels; above a Display title, stack.
  • gap-stack-tightspacing.stackTight · 8px
    Inside one unit: label, hint and control; a title and its meta.
  • gap-stackspacing.stack · 16px
    The parts of a block: heading and text, text and actions.
  • gap-stack-relaxedspacing.stackRelaxed · 24px
    Peers in a list: fields of a form, steps, items in a column.
  • gap-groupspacing.group · 32px
    Groups and columns; the same as card.padding.
  • gap-regionspacing.region · 48px
    Regions of a product screen: head, toolbar, content.

Breakpoints of Columns

Layout tokens
TokenValueUse
layout.columns640pxContainer width at which Columns splits (container query @columns).
layout.cardMin280pxSmallest card column in layout="cards".