Grid
CSS grid layout component to arrange direct child elements in a tiled grid layout.
import { Grid } from 'theme-ui'
Props
The Grid component includes custom props for adjusting the grid layout.
Each prop can use the responsive array syntax for mobile-first responsive styles.
| Prop | Description | 
|---|---|
| width | Minimum width of child elements | 
| gap | Space between child elements | 
| columns | Number of (equally-sized) columns, or string with grid syntax for the layout (cannot be used in conjunction with the widthprop) | 
| repeat | Mode for column sizing, used in conjunction with the widthprop. Can either befitorfill(fitis default) | 
Variants
You can define additional CSS grid layouts by adding variants to the theme.grids object.
These styles can be used to create a wide variety of different reusable layouts.