Skip to Content

Grid

CSS grid wrapper. Either set a fixed number of columns (or a raw grid-template-columns string), or set minChildWidth to auto-fill as many columns as fit.

One
Two
Three
import { Grid } from '@gg-software/ui'; <Grid columns={3} gap="sm"> <Card size="small">One</Card> <Card size="small">Two</Card> <Card size="small">Three</Card> </Grid> // responsive: as many 220px+ columns as fit <Grid minChildWidth={220} gap="md"> {cards} </Grid>

Props

PropTypeDefaultDescription
childrenReactNodecontent rendered inside the component
asElementType
columnsstring | number12number of equal columns, or a raw grid-template-columns string
minChildWidthstring | numberauto-fill columns at least this wide (overrides `columns`)
gapSpaceValuemd
alignAlignItems
justifyJustifyItems
classNamestring
styleCSSProperties

* required · generated from packages/ui/src/layout/Grid/Grid.tsx