Skip to content

Tag

A small label for a status or category.

Updated View as Markdown
Preview

Loading preview…

root = Row(Tag("Neutral"), Tag("Info", tone:info), Tag("Live", tone:success, pill), Tag("At risk", tone:danger, icon:alert-triangle), gap:sm)

Signature

This is the line a model reads in the system prompt.

Tag(label, tone:Tone, icon:Icon2, pill)
  • Group: Content
  • Children: No
  • Positional arguments: label (a trailing ? means it may be left out)

Props

Prop Type How to write it Notes
label string positional, required
tone neutral · info · success · warning · danger · accent named: tone:… Default "neutral". Also accepts error, red, green, blue, yellow, primary.
icon name (open list) named: icon:… 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.
pill flag bare word: pill

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({ Tag: MyTag });
<GistUI library={lib} stream={response.body} />;
<GistUI :source="answer" :components="{ Tag: MyTag }" />
<GistUI source={answer} components={{ Tag: MyTag }} />
<GistUI source={answer()} components={{ Tag: MyTag }} />
import { ui } from "@gistui/vanilla/ui";

const lib = ui.extend({ Tag: (ctx) => ({ el: myElement(ctx) }) });

See Custom components for the full contract. Style hook: [data-gistui="Tag"].

Navigation

Type to search…

↑↓ navigate↵ selectEsc close