Tonic UI
Getting StartedColor ModeColor StyleVersionsContributing
THEME
BordersBreakpointsColorsOutlinesPositionsSpacingSizesShadowsTypography
BUILDING BLOCKS
BoxControlBox
UTILITIES

Grid

Grid is a Box with display: grid and comes with helpful style shorthand props.

Import

Usage

Grid provides the following style shorthand props:

Shorthand PropStyle PropCSS PropertyDescription
gapgridGapgrid-gapSets the gaps (gutters) between rows and columns. It is a shorthand for row-gap and column-gap.
rowGapgridRowGapgrid-row-gapSets the size of the gap (gutter) between an element's grid rows.
columnGapgridColumnGapgrid-column-gapSets the size of the gap (gutter) between an element's columns.
rowgridRowgrid-rowa shorthand property for grid-row-start and grid-row-end.
columngridColumngrid-columnA shorthand property for grid-column-start and grid-column-end.
areagridAreagrid-areaA shorthand property for grid-row-start, grid-column-start, grid-row-end and grid-column-end.
autoFlowgridAutoFlowgrid-auto-flowControls how the auto-placement algorithm works.
autoRowsgridAutoRowsgrid-auto-rowsSpecifies the size of an implicitly-created grid row track or pattern of tracks.
autoColumnsgridAutoColumnsgrid-auto-columnsSpecifies the size of an implicitly-created grid column track or pattern of tracks.
templateRowsgridTemplateRowsgrid-template-rowsDefines the line names and track sizing functions of the grid rows.
templateColumnsgridTemplateColumnsgrid-template-columnsDefines the line names and track sizing functions of the grid columns.
templateAreasgridTemplateAreasgrid-template-areasSpecifies named grid areas.

The gap (gridGap) property

EDITABLE EXAMPLE

The rowGap (gridRowGap) property

EDITABLE EXAMPLE

The columnGap (gridColumnGap) property

EDITABLE EXAMPLE

The row (gridRow) property

EDITABLE EXAMPLE

The column (gridColumn) property

EDITABLE EXAMPLE

The area (gridArea) property

EDITABLE EXAMPLE

The autoFlow (gridAutoFlow) property

EDITABLE EXAMPLE

The autoRows (gridAutoRows) property

EDITABLE EXAMPLE

The autoColumns (gridAutoColumns) property

EDITABLE EXAMPLE

The templateRows (gridTemplateRows) property

EDITABLE EXAMPLE

The templateColumns (gridTemplateColumns) property

EDITABLE EXAMPLE

The templateAreas (gridTemplateAreas) property

EDITABLE EXAMPLE