Badge
A small status label.
Props
text: string | binding | calltone(optional): "neutral" | "positive" | "negative" | "warning"minHeight(optional): integer — The least height of this component's box, in pixels. It is as tall as what it holds, or this, whichever is more.
Example
The same component written three ways. Each draws the same surface.
As JSX, with analyticsMarkup from @surfaces-ui/spec/react:
<Ui.Badge text="Up to date" tone="positive" />As an agent sends it (one component of an A2UI updateComponents message):
{
"id": "status",
"component": "Badge",
"text": "Up to date",
"tone": "positive"
}As a json-render spec, which fromJsonRender converts:
{
"root": "status",
"elements": {
"status": {
"type": "Badge",
"props": {
"text": "Up to date",
"tone": "positive"
}
}
}
}