Grid
Arrange mixed components in a 2–3 column grid, with items that can span wider.
≈ 802 tokens per use (tool 364 · guidance 192 · typical payload 246)How token costs are estimated
Example: Grid
Give me the Q4 launch at a glance.
Q4 launch: Team plan
At risk- Launch date
- Tue 18 Nov
- Open tasks
- 6 of 22
- Owner
- Noa S.
- Blocker
- Billing migration
Before launch
0 of 4 doneWhen to use
- An overview made of several small, different components: KPIs, a chart, a short table, an insight, each from its own data.
- Some items deserve more width than others.
When not to use
- The items are the same kind, side by side for comparison. Use Columns.
- It's one component. Call it on its own.
- The items are long or interactive forms. Use a Stack.
How it works
items lists 2–9 components by catalog name. Each takes one column unless span says 2 or "full". On phones everything is one column:
{
"columns": 2,
"items": [
{ "component": "show_summary", "props": { "…": "…" } },
{ "component": "show_callout", "props": { "…": "…" } },
{ "span": "full", "component": "show_chart", "props": { "…": "…" } }
]
}Like every layout it renders through the Renderer, may hold one more layout inside, and passes each interactive child's result up as { child, result }.
How the agent should use it
- Order by importance, reading left to right, top to bottom. The first item is the headline.
- One wide item, at most two: a chart or a table under a row of cards.
- Keep items short. Cards, not documents.
Installation
npx shadcn@latest add https://your-site.com/r/layout-grid.json
Usage
import { LayoutGrid } from "@/components/genui/layout-grid"
export const catalog = {
show_grid: LayoutGrid,
show_kpis: KpiCard,
show_chart: Chart,
} satisfies GenUICatalogSchema
| Prop | Type | Notes |
|---|---|---|
columns | 2 | 3 | Default 2. Always one column on phones |
items | { component, props, id?, span? }[] | 2–9 components. span: 1, 2 or "full" |
Host props: status and className. renderChild is injected by the Renderer.