Components · Layout
Tabs
Tabbed panels. Give one tabs entry per child: child N is the panel for tab N.
ExamplesLink to this section
The migration finished in 14 minutes with no errors.
Show JSONHide JSON
{
"version": 1,
"root": "tabs",
"elements": {
"tabs": {
"type": "Tabs",
"props": { "tabs": [{ "label": "Summary" }, { "label": "Details" }] },
"children": ["summary", "details"]
},
"summary": {
"type": "Text",
"props": { "text": "The migration finished in 14 minutes with no errors." }
},
"details": {
"type": "KeyValue",
"props": {
"items": [
{
"label": "Rows moved",
"value": 1284000,
"format": "compact"
},
{ "label": "Duration", "value": "14 min" }
]
}
}
}
}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 |
|---|---|---|
| tabsrequired | object[] | 1–12 items |
| tabs[].labelrequired | string | max 60 chars |
| defaultIndex | integer | 0–11 |
RulesLink to this section
- Give exactly one child per entry in
tabs: child N is the panel for tab N. defaultIndexpicks the tab that opens first (0-based).- Do not give Tabs
repeat: the panels pair with the tabs by their place in the spec, so write each panel out. Tabs withrepeatstill draw, with a warning.
ChildrenLink to this section
Tabs shows its children, in order.
It emits no events.