Primals
Grid

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

PropTypeDescription
childrenReactNodeThe content of the Box component.
heightnumber | stringThe height of the Box container.
mnumber | stringThe margin around the Box container.
mbnumber | stringThe bottom margin of the Box container.
mlnumber | stringThe left margin of the Box container.
mrnumber | stringThe right margin of the Box container.
mtnumber | stringThe top margin of the Box container.
mxnumber | stringThe horizontal margin of the Box container.
mynumber | stringThe vertical margin of the Box container.
pnumber | stringThe padding around the Box container.
pbnumber | stringThe bottom padding of the Box container.
plnumber | stringThe left padding of the Box container.
prnumber | stringThe right padding of the Box container.
ptnumber | stringThe top padding of the Box container.
pxnumber | stringThe horizontal padding of the Box container.
pynumber | stringThe vertical padding of the Box container.
widthnumber | stringThe 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