Preview
Loading preview…
root = Row(Tag("Draft"), Tag("Review", tone:info), Tag("Live", tone:success), gap:sm, wrap)Signature
This is the line a model reads in the system prompt.
Row(...children, gap:Gap, align:Align, justify:Justify, wrap)- Group: Layout
- Children: Yes: any component or text
- Positional arguments: none
Props
| Prop | Type | How to write it | Notes |
|---|---|---|---|
gap |
none · xs · sm · md · lg · xl |
named: gap:… |
Also accepts small, medium, large. |
align |
start · center · end · stretch · between |
named: align:… |
|
justify |
start · center · end · between · around |
named: justify:… |
|
wrap |
flag | bare word: wrap |
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({ Row: MyRow });
<GistUI library={lib} stream={response.body} />;<GistUI :source="answer" :components="{ Row: MyRow }" /><GistUI source={answer} components={{ Row: MyRow }} /><GistUI source={answer()} components={{ Row: MyRow }} />import { ui } from "@gistui/vanilla/ui";
const lib = ui.extend({ Row: (ctx) => ({ el: myElement(ctx) }) });See Custom components for the full contract. Style hook: [data-gistui="Row"].