Preview
Loading preview…
root = Row(Icon(name:rocket), Icon(name:shield, tone:success), Icon(name:star, tone:warning, size:lg), Icon(name:globe, tone:info, plain), gap:md, align:center)Signature
This is the line a model reads in the system prompt.
Icon(name:Icon2, tone:Tone, size:Size, plain)- Group: Content
- Children: No
- Positional arguments:
name(a trailing?means it may be left out)
Props
| Prop | Type | How to write it | Notes |
|---|---|---|---|
name |
name (open list) | positional, required | Also accepts money, revenue, price, cost, payment, chart, analytics, trend, growth, decline, people, team, customers, person, company, office, location, place, travel, flight, food, restaurant, time, date, email, chat, security, idea, ai, launch, speed, energy, warning, error, success, video, movie, streaming, game, education, nature, health, legal, document, photo, shop, shopping, house, storage, api, winner, goal, sunny, clear, cloudy, partly-cloudy, rain, rainy, snow, storm, thunder, temperature, takeoff, departure, landing, arrival, baggage, seat, bag. |
tone |
neutral · info · success · warning · danger · accent |
named: tone:… |
Also accepts error, red, green, blue, yellow, primary. |
size |
sm · md · lg |
named: size:… |
Also accepts small, medium, large. |
plain |
flag | bare word: plain |
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({ Icon: MyIcon });
<GistUI library={lib} stream={response.body} />;<GistUI :source="answer" :components="{ Icon: MyIcon }" /><GistUI source={answer} components={{ Icon: MyIcon }} /><GistUI source={answer()} components={{ Icon: MyIcon }} />import { ui } from "@gistui/vanilla/ui";
const lib = ui.extend({ Icon: (ctx) => ({ el: myElement(ctx) }) });See Custom components for the full contract. Style hook: [data-gistui="Icon"].