Preview
Loading preview…
root = KeyValue(plan, cols:2)
plan = |Key|Value
|Plan|Team
|Monthly cost|$348
|Region|EU (Frankfurt)
|Tokens used|612k / 1MSignature
This is the line a model reads in the system prompt.
KeyValue(data:data, cols:num)- Group: Data
- Children: No
- Positional arguments:
data(a trailing?means it may be left out)
Props
| Prop | Type | How to write it | Notes |
|---|---|---|---|
data |
table | positional, required | |
cols |
number | named: cols:… |
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({ KeyValue: MyKeyValue });
<GistUI library={lib} stream={response.body} />;<GistUI :source="answer" :components="{ KeyValue: MyKeyValue }" /><GistUI source={answer} components={{ KeyValue: MyKeyValue }} /><GistUI source={answer()} components={{ KeyValue: MyKeyValue }} />import { ui } from "@gistui/vanilla/ui";
const lib = ui.extend({ KeyValue: (ctx) => ({ el: myElement(ctx) }) });See Custom components for the full contract. Style hook: [data-gistui="KeyValue"].