Preview
Loading preview…
root = Pricing(tiers, highlight:"Team", cta:"Choose")
tiers = |Plan|Price|Period|Features|Note
|Starter|$0|month|1 project; Community support|For side projects
|Team|$29|seat / month|Unlimited projects; SSO; Priority support|Most teams start here
|Enterprise|Custom||Self-hosting; SLA; Audit logs|Talk to usSignature
This is the line a model reads in the system prompt.
Pricing(data:data, highlight:str, cta:str, do:[@step…])- 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 | |
highlight |
string | named: highlight:… |
plan to feature |
cta |
string | named: cta:… |
|
do |
action list | named: do:… |
steps run on click |
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({ Pricing: MyPricing });
<GistUI library={lib} stream={response.body} />;<GistUI :source="answer" :components="{ Pricing: MyPricing }" /><GistUI source={answer} components={{ Pricing: MyPricing }} /><GistUI source={answer()} components={{ Pricing: MyPricing }} />import { ui } from "@gistui/vanilla/ui";
const lib = ui.extend({ Pricing: (ctx) => ({ el: myElement(ctx) }) });See Custom components for the full contract. Style hook: [data-gistui="Pricing"].