Split
A main component with a narrower aside beside it; they stack on phones.
≈ 1,113 tokens per use (tool 565 · guidance 179 · typical payload 369)How token costs are estimated
Example: Split
Plan my Saturday apartment viewings.
Saturday viewings
- 1. 2-bed on Rua da Prata
10:00 · €1,450/mo
- 2. 1-bed near Príncipe Real
11:00 · €1,280/mo
- 3. 2-bed by Jardim da Estrela
12:15 · €1,620/mo
- 4. 3-bed in Campo de Ourique
13:30 · €1,890/mo
Saturday
- Viewings
- 4
- First
- 10:00, Baixa
- Last
- 13:30, Campo de Ourique
- Walking
- About 55 min total
When to use
- One component is the answer and another belongs beside it: a map and the places on it, an article and its key facts, a chart and the controls that drive it.
When not to use
- The two parts are equals to compare. Use Columns.
- Both parts are wide (two tables, two charts). Use a Stack.
- There are more than two parts. Use a Grid or a Stack.
How it works
main and aside each name one component. The aside takes a third of the width ("narrow") or two fifths ("wide"), after the main or before it. On phones the main comes first and the aside follows:
{
"main": { "component": "show_map", "props": { "…": "…" } },
"aside": { "component": "show_summary", "props": { "…": "…" } },
"asideWidth": "narrow"
}Controls that drive the main component belong in the aside, with the main's props bound to their result. Like every layout it renders through the Renderer and may hold one more layout inside.
How the agent should use it
mainholds the answer;asideholds what supports it, and must read well at a third of the width.- Put controls in the aside and bind the main to them.
Installation
npx shadcn@latest add https://your-site.com/r/layout-split.json
Usage
import { LayoutSplit } from "@/components/genui/layout-split"
export const catalog = {
show_split: LayoutSplit,
show_map: MapView,
show_summary: SummaryCard,
} satisfies GenUICatalogSchema
| Prop | Type | Notes |
|---|---|---|
main | { component, props, id? } | The larger side |
aside | { component, props, id? } | The narrower side |
asideWidth | "narrow" | "wide" | Default "narrow" |
asidePosition | "end" | "start" | Default "end" |
Host props: status and className. renderChild is injected by the Renderer.