Skip to content

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

Change the props and the surface. The controls come from the documented props; the surfaces are the real modes.
First column
Second column
Third column
tsx
<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

Do
  • 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.
Don’t
  • 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

The parts of the component and what each one does, as in the playground above.
  1. containerQuery container: the split depends on its width, not the viewport.
  2. groupGrid with gap spacing.group (32px); every column can shrink below its content width.

Examples

Type-checked, and the same code goes into the AI manifest. Import: import { Columns } from "@/ds";

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.

Role
Lead designer
Team
Four product teams

cards: as many columns as fit

Tokens

Every value has a name.

Components

Built only from tokens.

Patterns

Decided compositions.

Props

Checked against the component's TypeScript type on every build.
Columns props
NameTypeDefaultDescription
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

Derived from the utility classes in the component's source. Copy a class with one click.
Tokens used by Columns
TokenTierValueUtility
spacing.groupsemantic32px

Accessibility

What is checked automatically on every build, and what a person has tested. Nothing is marked as tested unless it was.
Testing status by check
CheckHowStatus
axe-core rulesAutomated on every npm run check, at desktop and mobile widthRuns on every build
KeyboardAutomated Playwright test (scripts/keyboard.mjs)Not applicable
Screen readerManualNot applicable

Semantics and focus

  • Columns adds no semantics; give regions their own headings or landmarks.