AutoGrid
layoutsAn intrinsically responsive grid: columns at least min wide fill the row and wrap, optionally capped by max width or maxCols, no media queries.
Service health dashboard
min="13rem": four columns on a desktop, one on a phone, no breakpoints. Drag the preview edge.
api-gateway Healthy
gateway · eu-west-1 worker-02 Degraded
worker · eu-west-1 cache-01 Down
cache · us-east-1 postgres-primary Healthy
database · eu-west-1 media-transcode Healthy
service · ap-northeast-1 search-index Degraded
service · us-east-1 Column sizing modes
Default auto-fit stretches columns to fill; max caps and left-packs them; fill keeps empty tracks; maxCols={2} never exceeds two; template bypasses all of it.
min="8rem"
Inbox
Drafts
Sent
min="8rem" max="10rem"
Inbox
Drafts
Sent
min="8rem" fill
Inbox
Drafts
Sent
min="8rem" maxCols={2}
Inbox
Drafts
Sent
template="2fr 1fr"
Inbox
Drafts
Sent
Uneven content and a lone card
align="start" (default) keeps short cards short, align="stretch" equalises a row; a single result stretches under auto-fit but keeps its width with max.
align="start" align="stretch" one item, default vs max="16rem"
Rotate keys.
Postgres failover drill moved to Thursday; the read replica in eu-west-1 needs a fresh base backup before then.
Ship the changelog.
Rotate keys.
Postgres failover drill moved to Thursday; the read replica in eu-west-1 needs a fresh base backup before then.
Ship the changelog.
1 search result
1 search result
Props
| Prop | Type | Default | Description |
|---|---|---|---|
as | 'div' | 'section' | 'ul' | 'ol' | 'div' | |
min | string | '14rem' | |
max | string | — | Maximum column width. When set, columns stop growing at this width and the grid left-packs uniform tracks instead of stretching to fill. |
fill | boolean | false | Keep empty tracks (auto-fill) without capping column width: columns are counted by `min`, so count grows monotonically with available space and sparse rows don't stretch to fill. Ignored when `max` is set. |
gap | string | 'var(--sp-4)' | |
maxCols | number | — | |
template | string | — | Explicit `grid-template-columns` (e.g. `1fr 1fr auto`); bypasses `min`/`max`. |
align | 'start' | 'center' | 'end' | 'stretch' | 'start' | Cross-axis alignment of items in their row (align-items). Defaults to `start`. |
justify | 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly' | 'stretch' | — | Inline (main-axis) distribution of tracks (justify-content). Defaults to `start` when `max` is set, otherwise the grid's natural `stretch`. |
class | string | '' | |
children | Snippet | — |