Grid

Beta notice: This page is being built.Edit on GitHub(opens in new tab)

Grid supports fixed columns or responsive tracks with columns={{ minWidth: 240, max: 3 }}. Responsive tracks reflow with the container width; use one-column or full GridSpan items with them. For unequal fixed-column layouts, collapseBelow={768} switches to a single column at narrow View viewport widths and makes spanning children full-width.

This is a LongLink-specific component.

longlink docs component "Grid"

Example

Properties

Grid - Properties
childrenReactNode
Grid content.
columnsnumber | { minWidth: number; max?: number; repeat?: "fill" | "fit"; }
Fixed column count or responsive columns with minWidth and an optional max.
collapseBelownumber
View width in pixels at or below which all items use one column.
gap0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10
Spacing between all items.
rowGap0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10
Row spacing; overrides `gap` for the row axis.
columnGap0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10
Column spacing; overrides `gap` for the column axis.
align"start" | "center" | "end" | "stretch"
Vertical alignment of items.
justify"start" | "center" | "end" | "stretch"
Horizontal alignment of items.
widthstring | number
Container width. Numbers are treated as pixels, strings are used as-is.
heightstring | number
Container height. Numbers are treated as pixels, strings are used as-is.
maxWidthstring | number
Maximum container width. Numbers are treated as pixels, strings are used as-is.
minHeightstring | number
Minimum container height. Numbers are treated as pixels, strings are used as-is.
GridSpan - Properties
childrenReactNode
Content rendered inside the grid item.
columnsnumber | "full"
Number of columns to occupy, or full to span the entire grid.