Luke UI
GitHub repository

AutoGrid

Arrange direct children in an intrinsic equal-column grid.

AutoGrid lays out direct children in equal columns that grow from a minimum inline size. Use it when the column count should follow the available space. Read Layout to choose a layout component.

AutoGrid owns column sizing and placement. Keep direct children auto-placed and single-track.

If a child needs to span tracks or use explicit grid placement, use Grid instead.

AutoGrid: Basic
Loading AutoGrid: Basic example

Minimum column size

Each column uses min(minColumnInlineSize, 100%), so a parent narrower than the requested minimum does not force the grid tracks to overflow.

AutoGrid: Minimum column size
Loading AutoGrid: Minimum column size example

Responsive minimum column size

minColumnInlineSize accepts a responsive object with a required initial value.

AutoGrid: Responsive minimum column size
Loading AutoGrid: Responsive minimum column size example

Choose the rendered element

AutoGrid uses Box's elementType and render contract.

AutoGrid: List
Loading AutoGrid: List example

API

AutoGridProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.

Prop

Type