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
headerTextOptional text above the carouselString
headerTextPositionText alignment of grid header
  • left
  • right
  • center
backgroundColorColor of the grid background
  • primary
  • secondary
  • accent
  • background
  • destructive
  • muted

Customization

The 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 in the UI library package directly.
  • Otherwise, pass className overrides.

Class overrides can be passed in to any grid component to get the layout and style you need.

<Grid className='pt-12'>
<GridHeaderText
position={headerTextPosition}
{...headerText}
className='py-8 text-2xl'
/>
<GridContent className='bg-accent'>{...content}</GridContent>
</Grid>