Skip to main content
The Grid component uses CSS Grid to arrange child elements in a tiled layout with automatic responsive behavior.

Import

Usage

Props

ResponsiveValue<string | number>
Number of columns for the grid layout. Cannot be used with the width prop.
ResponsiveValue<string | number>
Minimum width of child elements. The grid will automatically calculate columns using auto-fit or auto-fill. Cannot be used with the columns prop.
ResponsiveValue<string | number>
default:"3"
Space between grid items. Maps to theme space values.
'fit' | 'fill'
default:"'fit'"
Controls auto-repeat behavior:
  • fit: Grid tracks collapse if not filled
  • fill: Grid tracks maintain size even if empty
ThemeUIStyleObject
Additional theme-aware styles.
string
Apply a variant from theme.grids.

Inherited Props

Grid extends Box and accepts all Box props including spacing and color utilities.

Examples

Fixed Columns

Responsive Columns

Auto-fit Width

Responsive Gap

Custom Grid Template