Skip to main content

Grid

A Grid displays content in a grid.

Example

Grid Header

1
2
3
4
5
6
7
8
9
10
11
12

Variants

Use theicon above to preview
VariantDescriptionValues
smNumber of columns in small screens
  • 1
  • 2
mdNumber of columns in medium screens
  • 1
  • 2
  • 3
lgNumber of columns in large screens
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
gapSpace between the columns and rows
  • None
  • Small
  • Medium
  • Large
  • Extra Large
fullBleedWidth of the grid is flush left and right or has side padding
  • True
  • False
paddingTopOption to control spacing above the grid
  • Regular
  • Extra
paddingBottomOption to control spacing below the grid
  • Regular
  • Extra
headerTextPositionText alignment of grid header
  • Left
  • Right
  • Center

Customization

Approach for customization will vary depending on if the customization is intended to be global for all consumers of the ui component or if it is only an override for a particular instance.

  • If the customization is necessary for all use cases, update the component source code of in the ui library package directly.
  • Otherwise, pass className overrides (the <Grid> and <GridContent> componennts can accept className overrides).

Say you wanted to make the header text larger in one particular instance:

<Grid className='pt-12'>
<GridHeaderText position={headerTextPosition}>{headerText}</GridHeaderText>
<GridContent>{...content}</GridContent>
</Grid>