- Docs
- Components
- Layout
Grid
Equal columns that change with the window's size class, with gaps from the space scale.
- Import
- @qeetrix/react
- Status
- StableSince 0.0.2
- Renders
<div>Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Playground
Every prop, live, and the code it takes.
1
2
3
4
5
6
Columns
Gap
import { Grid } from "@qeetrix/react";
<Grid columns={3}>…</Grid>02
Equal columns
columns: one count, 1 to 12, each column the same width; md (12px) apart by default.
1
2
3
4
5
6
<Grid columns={3}>…</Grid>03
By window size
One count per window size class: base under 600px, medium from 600, expanded from 840, large from 1200, xlarge from 1600. Resize the window.
1
2
3
4
5
6
7
8
<Grid columns={{ base: 1, medium: 2, expanded: 3, large: 4 }} gap="lg">…</Grid>04
A main and a side column
GridItem span: a detail page's main column beside its side column, stacked where it's narrow.
Profile, security and sessions
Recent activity
<Grid columns={{ base: 1, large: 3 }} gap="xl">
<GridItem span={{ large: 2 }}>…</GridItem>
<GridItem>…</GridItem>
</Grid>05
A place of its own
GridItem start: the column a cell starts in, 1 at the start edge.
Columns 2 and 3
<Grid columns={4}>
<GridItem start={2} span={2}>…</GridItem>
</Grid>