Skip to main content

Grid

Grid is a layout component that arranges children in a responsive grid system with configurable columns and spacing.

Usage

<Grid 
itemsPerRow={3}
gap={4}
>
<Box>Item 1</Box>
<Box>Item 2</Box>
<Box>Item 3</Box>
</Grid>

Responsive Grid

<Grid 
itemsPerRow={{
base: 1,
sm: 2,
md: 3,
lg: 4
}}
gap={4}
>
{/* Grid items */}
</Grid>

Props

Grid accepts all styled-system props from the following categories:

Additional Props

PropTypeDescription
itemsPerRownumber \| ResponsiveValue<number>Number of items per row
gapnumber \| stringSpace between grid items