Grid

Layout primitives for composing responsive regions.

v1.0.0·Updated Jul 10, 2026 · 23:00
Live Demo — Fully Interactive
Twelve equal tracksrepeat(12, 1fr) · gap 12px
1
1
1
1
1
1
1
1
1
1
1
1
Halves & thirds6+6 · 4+4+4
6
6
4
4
4
Configuration
Span
Gap
Offset
4
<Col span={4} />
Behavior — The Engineering Contract
PropTypeNotes
columnsnumber = 12Track count on the row; 12 is the base scale
gapsm · default · lg12 · 24 · 32px between tracks
span1–12How many tracks a column occupies
offset0–11Empty tracks before the column starts
maxWidthnumber = 1280Container cap; content centres inside it
reflowmd · smFewer tracks at ≤767px, single column ≤479px

The Grid holds no state and fires no events — it reflows through media queries alone, so the layout is correct on the server before a single line of JavaScript runs.

Anatomy
4
4
4
1ContainerMax-width 1280px with 24px padding; centres the row.
2ColumnSpans one or more of the twelve equal tracks.
3GapThe consistent gutter between tracks — never margins.

Two more properties aren't visible in a single frame: offset pushes a column inward by leaving leading tracks empty, and reflow drops the track count at the md and sm breakpoints. Both are in the contract above.

Do's and Don'ts
✓ Do
8
4

Compose regions from spans of a shared 12-track row. The gap stays consistent everywhere.

✕ Don't
132px
60px

Don't hard-code pixel widths per column. They break the moment content or the viewport changes.

✓ Do
6
6

Use the gap tokens (12 / 24 / 32) for gutters, so rhythm matches the rest of the page.

✕ Don't
5
5

Don't leave spans that don't total the columns unless the trailing space is intentional.

In context: Examples
A · KPI dashboard
Metric54
Metric1.3k
Metric89%

Four-across stat cards on a 3-span rhythm.

B · Main + sidebar
col-8
col-4

An 8+4 split for content beside a rail.

C · Two-column form
First
Last
Email

Paired fields on 6+6, full-width where needed.

Measurements & Tokens
TokenValueRole
--grid-columns12Tracks on the base row
--grid-gap24pxDefault gutter between tracks
--grid-gap-sm12pxTight gutter
--grid-gap-lg32pxRoomy gutter
--container-max1280pxPage container cap
--container-pad0 24pxContainer horizontal padding
--bp-md≤ 767pxRow collapses toward 6 tracks
--bp-sm≤ 479pxRow becomes a single column
Code
<div class="o-container">
  <div class="o-row">
    <div class="o-col" style="--span:8">Main</div>
    <div class="o-col" style="--span:4">Sidebar</div>
  </div>
</div>