Preview
Loading preview…
root = Buttons(Button("Cancel", v:ghost), Button("Save draft", v:secondary), Button("Publish"), align:end)Signature
This is the line a model reads in the system prompt.
Buttons(...Button, align:start|end)- Group: Forms
- Children: Yes: Button
- Positional arguments: none
Props
| Prop | Type | How to write it | Notes |
|---|---|---|---|
align |
start · end |
named: align:… |
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({ Buttons: MyButtons });
<GistUI library={lib} stream={response.body} />;<GistUI :source="answer" :components="{ Buttons: MyButtons }" /><GistUI source={answer} components={{ Buttons: MyButtons }} /><GistUI source={answer()} components={{ Buttons: MyButtons }} />import { ui } from "@gistui/vanilla/ui";
const lib = ui.extend({ Buttons: (ctx) => ({ el: myElement(ctx) }) });See Custom components for the full contract. Style hook: [data-gistui="Buttons"].