Genesis
@beta

Grid

Grid — two-dimensional flow for card and tile collections. `cols` is the count at the widest breakpoint; the class it emits is a responsive ramp, so a card grid reflows on its own without the consumer writing a single breakpoint. ```tsx <Grid cols={3} gap="lg"> {people.map((p) => <PersonCard key={p.id} person={p} />)} </Grid> <Grid cols={4} gap="sm" align="start"> {stats.map((s) => <StatCard key={s.id} {...s} />)} </Grid> ``` Deliberately NOT here: `grid-template-areas`, explicit row/column placement, and per-child spans. A component that positions a *named* child has stopped positioning things without knowing what they are, and a grid whose children each carry placement props is a CSS file wearing a React costume — reach for `className` at that point.

packages/ui/src/components/layout/grid.tsx

Import
Subpath export: @marktiderman/genesis-ui/layout
import { Grid } from "@marktiderman/genesis-ui/layout";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

Grid

Grid — two-dimensional flow for card and tile collections. `cols` is the count at the widest breakpoint; the class it emits is a responsive ramp, so a card grid reflows on its own without the consumer writing a single breakpoint. ```tsx <Grid cols={3} gap="lg"> {people.map((p) => <PersonCard key={p.id} person={p} />)} </Grid> <Grid cols={4} gap="sm" align="start"> {stats.map((s) => <StatCard key={s.id} {...s} />)} </Grid> ``` Deliberately NOT here: `grid-template-areas`, explicit row/column placement, and per-child spans. A component that positions a *named* child has stopped positioning things without knowing what they are, and a grid whose children each carry placement props is a CSS file wearing a React costume — reach for `className` at that point.

PropTypeDefaultDescription
align"start" | "center" | "end" | "stretch" | null—
cols4 | 3 | 1 | 2 | 5 | 6 | null—
gap"none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | null—
testIDstring—Stable test/automation selector (emitted as `data-testid`).