Preview
Loading preview…
root = Tabs(Tab("Overview", "Revenue grew **8%** this quarter.", icon:trending-up), Tab("Customers", "3,410 active customers.", icon:users), Tab("Risks", Callout("Two renewals are at risk.", tone:warning)), v:pills)Signature
This is the line a model reads in the system prompt.
Tabs(...Tab, v:line|pills, bind:$var)- Group: Layout
- Children: Yes: Tab
- Positional arguments: none
Props
| Prop | Type | How to write it | Notes |
|---|---|---|---|
v |
line · pills |
named: v:… |
Default "line". |
bind |
$state variable |
bind:$name |
two-way binding to a $variable |
Use your own component
Keep the name and schema, swap what is drawn. The prompt and the model’s output do not change.
import { ui } from "@gistui/react/ui";
const lib = ui.extend({ Tabs: MyTabs });
<GistUI library={lib} stream={response.body} />;<GistUI :source="answer" :components="{ Tabs: MyTabs }" /><GistUI source={answer} components={{ Tabs: MyTabs }} /><GistUI source={answer()} components={{ Tabs: MyTabs }} />import { ui } from "@gistui/vanilla/ui";
const lib = ui.extend({ Tabs: (ctx) => ({ el: myElement(ctx) }) });See Custom components for the full contract. Style hook: [data-gistui="Tabs"].