Components · Layout
Grid
A responsive grid. columns (1-4) applies where the interface is wide enough; a narrow one shows fewer, and phones show one column, or two with narrowColumns: 2 (small items such as metrics or logos). spans gives how many columns each child takes, one entry per child in order (a wide card in a feature grid: "spans": [2, 1, 1]); a span is at most columns, and where the grid shows fewer columns it takes them all, so nothing overflows.
ExamplesLink to this section
Deploys this week
42
+12%
Failed deploys
2
-1
Lead time
3.4h
-0.6 h
Show JSONHide JSON
{
"version": 1,
"root": "grid",
"elements": {
"grid": {
"type": "Grid",
"props": { "columns": 3 },
"children": ["deploys", "failures", "lead"]
},
"deploys": {
"type": "Metric",
"props": {
"label": "Deploys this week",
"value": 42,
"change": 12,
"changeFormat": "percent",
"goodDirection": "up"
}
},
"failures": {
"type": "Metric",
"props": {
"label": "Failed deploys",
"value": 2,
"change": -1,
"goodDirection": "down"
}
},
"lead": {
"type": "Metric",
"props": {
"label": "Lead time",
"value": 3.4,
"unit": "h",
"change": -0.6,
"goodDirection": "down"
}
}
}
}The first card spans two of three columns. On a phone every card is a full row.
Every shelf, counted nightly
The headline feature takes the wide cell.
Scan
Point a phone at a shelf.
Sync
Counts reach the office at once.
Alerts
Hear about a gap before a customer does.
Reports
A weekly summary for each store.
Show JSONHide JSON
{
"version": 1,
"root": "grid",
"elements": {
"grid": {
"type": "Grid",
"props": { "columns": 3, "spans": [2, 1, 1, 1, 1] },
"children": ["lead", "scan", "sync", "alert", "report"]
},
"lead": {
"type": "Card",
"props": {
"title": "Every shelf, counted nightly",
"description": "The headline feature takes the wide cell."
}
},
"scan": {
"type": "Card",
"props": { "title": "Scan", "description": "Point a phone at a shelf." }
},
"sync": {
"type": "Card",
"props": {
"title": "Sync",
"description": "Counts reach the office at once."
}
},
"alert": {
"type": "Card",
"props": {
"title": "Alerts",
"description": "Hear about a gap before a customer does."
}
},
"report": {
"type": "Card",
"props": {
"title": "Reports",
"description": "A weekly summary for each store."
}
}
}
}Small items stay two across on a narrow screen, so a band of stats is half as tall.
Teams
1,280
Artifacts
48.2K
Agents
312
Uptime
99.98%
Show JSONHide JSON
{
"version": 1,
"root": "grid",
"elements": {
"grid": {
"type": "Grid",
"props": { "columns": 4, "narrowColumns": 2 },
"children": ["teams", "artifacts", "agents", "uptime"]
},
"teams": {
"type": "Metric",
"props": { "label": "Teams", "value": 1280, "variant": "plain" }
},
"artifacts": {
"type": "Metric",
"props": {
"label": "Artifacts",
"value": 48200,
"format": "compact",
"variant": "plain"
}
},
"agents": {
"type": "Metric",
"props": { "label": "Agents", "value": 312, "variant": "plain" }
},
"uptime": {
"type": "Metric",
"props": {
"label": "Uptime",
"value": 99.98,
"unit": "%",
"variant": "plain"
}
}
}
}PropsLink to this section
Generated from the zod schema the server validates with. Unknown props are ignored with a warning. Any prop can also be a dynamic value such as { "$state": "/path" }; it is checked again once it resolves.
| Prop | Type | Limits and defaults |
|---|---|---|
| columns | integer | 1–4 |
| narrowColumns | integer | 1–2 |
| spans | integer[] | max 200 items |
| gap | "none" | "sm" | "md" | "lg" | — |
RulesLink to this section
columnsapplies on wide screens. Phones show one column, or two withnarrowColumns: 2, which is never more thancolumns.spanshas one entry per child, in order: how many columns that child takes, from 1 tocolumns. Leave it out and every child takes one.- Where the grid shows fewer columns than a span (two on a tablet, one on a phone), the child takes every column there is, so a wide card is a full row on a phone.
spanspairs with the children written in the spec, so a Grid withrepeattakes none.
ChildrenLink to this section
Grid shows its children, in order.
It emits no events.