01
Overview
Grid renders a low-chrome CSS grid container for explicit columns, intrinsic
auto-fill layouts, and optional child placement through Grid.Item.
Usage
Use minItemWidth for intrinsic responsive grids without adding media queries:
02
When to use
Use when
- Building form layouts, card grids, or dashboards that need two-dimensional placement.
- Creating intrinsic responsive grids by passing minItemWidth.
Avoid when
- Presenting homogeneous gallery tiles - use grid-list instead. Use Grid list instead
- Packing variable-height content into waterfall columns - use masonry instead. Use Masonry instead
03
Examples
Auto-fill cards
Grid can create intrinsic responsive columns from a minimum item width.
Explicit placement
A 12-column grid using Grid.Item for spans while plain children use auto-placement.
04
Props
| Name | Type | Default | Required | Bindable | Description |
|---|---|---|---|---|---|
columns | number | string | Positive integer number of equal-width columns or a full CSS grid-template-columns value.
Numeric values render as repeat(<columns>, 1fr). | |||
gap | text | Uniform row and column gap. | |||
rowGap | text | Row gap override. Wins over gap for rows. | |||
columnGap | text | Column gap override. Wins over gap for columns. | |||
minItemWidth | text | Minimum item width for an intrinsic auto-fill grid. When present, this takes
precedence over columns. | |||
as | NonVoidHTMLElementTagName | 'div' | Rendered HTML tag. | ||
children | snippet | req | Grid contents. |