Layout
Columns
Content side by side by name: halves, thirds, main-aside, aside-main or cards. Splits at a container width of 640px, gap spacing.group. The only way to build columns in screens.
- Experimental
- No keyboard interaction
- No screen reader interaction
Playground
<Columns layout="thirds">
<IndustrialCard>First column</IndustrialCard>
<IndustrialCard>Second column</IndustrialCard>
<IndustrialCard>Third column</IndustrialCard>
</Columns>Usage
When to use
Use Columns whenever content sits side by side: a case text with its facts, two equal halves, a set of cards. It is the only way to build columns in a screen.
When not to use
- For a single column of text: use Container or Section with
width="narrow". - For rows people compare value by value: use Table.
- For a facts grid such as client, role and period: use DescriptionList with
variant="columns".
How it works
Each layout has a name instead of grid numbers. halves and thirds split evenly, main-aside gives the first column two thirds, aside-main the second. They split once Columns itself is at least 640px wide, so the same layout works on a full page, in a dialog or next to a sidebar. Below that every column stacks in DOM order. cards fits as many columns of at least 280px as there is room for. The gap is always spacing.group (32px).
Content guidelines
Put the column that matters most first in the code: on a phone it is the one people see first. Keep columns roughly balanced in length; a long main column next to a two-line aside reads better as main-aside than as halves.
Do and don’t
- Pick the layout by what the columns hold: main-aside for content with a summary, halves for two equal parts, cards for a set people compare.
- Put the more important column first in the DOM; on small widths it comes first.
- No grid-cols-*, col-span-* or numeric gap-* in screens; use Columns.
- Don't nest Columns more than once; a second level is usually a list or a DescriptionList.
- Don't reorder columns visually; reading order and visual order stay the same.
Anatomy
- containerQuery container: the split depends on its width, not the viewport.
- groupGrid with gap spacing.group (32px); every column can shrink below its content width.
Examples
main-aside: content with a summary
Challenge
Four teams built the same screens in four ways. The system had to make one way the easy way.
- Lead designer
- Four product teams
cards: as many columns as fit
Tokens
Every value has a name.
Components
Built only from tokens.
Patterns
Decided compositions.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| layout | "halves" | "thirds" | "main-aside" | "aside-main" | "cards" | "halves" | main-aside is 2:1, aside-main 1:2; cards fits as many columns of at least 280px as there is room for. |
| children (required) | ReactNode | – | One child per column, in reading order. |
Tokens used
| Token | Tier | Value | Utility |
|---|---|---|---|
| spacing.group | semantic | 32px |
Accessibility
| Check | How | Status |
|---|---|---|
| axe-core rules | Automated on every npm run check, at desktop and mobile width | Runs on every build |
| Keyboard | Automated Playwright test (scripts/keyboard.mjs) | Not applicable |
| Screen reader | Manual | Not applicable |
Semantics and focus
- Columns adds no semantics; give regions their own headings or landmarks.