BalanceReckon Design System
LayoutGrid

Grid

The Grid layout primitive is a thin abstraction over the CSS grid layout.

GridProps

PropTypeRequiredDefaultDescription
alignContentResponsiveProp<CSSProperties['alignContent']>——Aligns the whole grid along the Column/Block axis
alignItemsResponsiveProp<CSSProperties['alignItems']>——Aligns the grid items (in their respective cells) along the Column/Block axis
childrenReactNode——The content of this grid element.
columnGapResponsiveProp<keyof BalanceTheme['spacing']>——Specifies width of the gutters between the columns
gapResponsiveProp<keyof BalanceTheme['spacing']>——The size of the gap between rows and columns
gridResponsiveProp<CSSProperties['grid']>——Sets all of the explicit and implicit grid properties in a single declaration.
gridAutoColumnsResponsiveProp<CSSProperties['gridAutoColumns']>——Specifies the size of any auto-generated grid tracks (aka implicit grid tracks).
gridAutoFlowResponsiveProp<CSSProperties['gridAutoFlow']>——Defines how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid.
gridAutoRowsResponsiveProp<CSSProperties['gridAutoRows']>——Specifies the width of any auto-generated grid tracks (aka implicit grid tracks).
gridTemplateResponsiveProp<CSSProperties['gridTemplate']>——A shorthand for setting grid-template-rows, grid-template-columns, and grid-template-areas in a single declaration.
gridTemplateAreasResponsiveProp<CSSProperties['gridTemplateAreas']>——Defines a grid template by referencing the names of the grid areas which are specified with the 'grid-area' property.
gridTemplateColumnsResponsiveProp<CSSProperties['gridTemplateColumns']>——Defines the columns of the grid with a space-separated list of values (e.g. 50px, 1fr, auto).
gridTemplateRowsResponsiveProp<CSSProperties['gridTemplateRows']>——Defines the rows of the grid with a space-separated list of values (e.g. 50px, 1fr, auto).
inlineboolean——Display as an inline-level grid container.
justifyContentResponsiveProp<CSSProperties['justifyContent']>——Aligns the whole grid along the Row/Inline axis
justifyItemsResponsiveProp<CSSProperties['justifyItems']>——Aligns the grid items (in their respective cells) along the Row/Inline axis
rowGapResponsiveProp<keyof BalanceTheme['spacing']>——Specifies width of the gutters between the rows
Also accepts BoxProps