Grid

React

Usage

Grid (optional)

By default, Grid.Row elements do not have to be wrapped in Grid, unless gutterX, gutterY or colStackCap need to be altered.

NameTypeRequiredDefaultDescription
colStackCapfalse

Sets a breakpoing at which columns will start stacking on top of each other. E.g. if set to "tabletMd" - columns will stack on "tabletMd", "tabletSm" and "mobileLg" breakpoints.

since

10.19.0

gutterX
GridSpacing
false

If given a spacing string value (e.g. "sm" or "none"), sets horizontal column spacing across all breakpoints. Horizontal gutters are ignored when columns are stacked.

If given an object, sets horizontal column spacing for given breakpoints (keys in configuration object, e.g. {"tabletMd": "xs", "mobileLg": "none"}).

since

10.19.0

gutterY
GridSpacing
false

If given a spacing string value (e.g. "sm" or "none"), sets vertical column spacing across all breakpoints.

If given an object, sets vertical column spacing for given breakpoints (keys in configuration object, e.g. {"tabletMd": "xs", "mobileLg": "none"}).

since

10.19.0

gutterX

none (default)

Custom horizontal gutter (fixed)

Custom horizontal gutter (by breakpoint)

gutterY

Vertical gutter is only displayed when the columns are stacked.

none (default)

Custom vertical gutter (fixed)

Custom vertical gutter (by breakpoint)

colStackCap

Sets a breakpoint starting from which the columns begin stacking. When stacking, the offsets will be ignored.

Grid.Row

A wrapper for Grid.Col. Currently, it has no API apart from DOM props etc.

Grid.Col

NameTypeRequiredDefaultDescription
colStart
number | Partial<OffsetByBreakpoint>
false

If given a number value between 1 and 12, sets start positions across all breakpoints.

since

10.19.0

If given an object, sets start positions for given breakpoints (keys in configuration object, e.g. {"tabletMd": 10, "mobileLg": 5}).

since

10.19.0

colWidth
number | "auto" | Partial<SpanByBreakpoint>
falseauto If given a number value between 1 and 12, sets column width across all breakpoints. If given an object, sets column widths for given breakpoints (keys in configuration object, e.g. {"tabletMd": 10, "mobileLg": 5}). If set to "auto", the column will take all the available space
defaultvalue

auto If given a number value between 1 and 12, sets column width across all breakpoints.

If given an object, sets column widths for given breakpoints (keys in configuration object, e.g. {"tabletMd": 10, "mobileLg": 5}).

If set to "auto", the column will take all the available space

since

10.19.0

colWidth

Fixed column width

Dynamic column width (by breakpoint)

colStart

Fixed column start

Dynamic column start (by breakpoint)