Grid
The Grid
component is a layout component that allows you to create a grid layout. It is a wrapper around the CSS Grid layout system.
<Grid>
<Cell>1</Cell>
<Cell>2</Cell>
<Cell>3</Cell>
</Grid>
Props
Prop | Type | Description |
---|---|---|
children | ReactNode | The content of the Box component. |
height | number | string | The height of the Box container. |
m | number | string | The margin around the Box container. |
mb | number | string | The bottom margin of the Box container. |
ml | number | string | The left margin of the Box container. |
mr | number | string | The right margin of the Box container. |
mt | number | string | The top margin of the Box container. |
mx | number | string | The horizontal margin of the Box container. |
my | number | string | The vertical margin of the Box container. |
p | number | string | The padding around the Box container. |
pb | number | string | The bottom padding of the Box container. |
pl | number | string | The left padding of the Box container. |
pr | number | string | The right padding of the Box container. |
pt | number | string | The top padding of the Box container. |
px | number | string | The horizontal padding of the Box container. |
py | number | string | The vertical padding of the Box container. |
width | number | string | The width of the Box container. |
Examples
Grid With Gap and Columns
1
2
3
Grid With Gap and Rows
1
2
3
Grid With Gap and Columns and Rows
1
2
3
4
5
6
7
8
9