Components · Content
Text
A paragraph of plain text. Line breaks are kept. variant: body (default), eyebrow (a small uppercase label), caption (small and muted), or mono. size (xs to 4xl), weight, align, and tone (default, muted, a status tone, or accent: the theme's own accent, or blue on the default palette) style it; clamp cuts it off after 1-3 lines. announce speaks the text to screen readers when it appears after a reader's action (a "thank you" line shown by a button press); leave it off text that is there from the start or that follows typing.
ExamplesLink to this section
The rollout is on track.
Line breaks are kept, so short notes read as written.
Updated by @release-bot 5 minutes ago.
New this month
Show JSONHide JSON
{
"version": 1,
"root": "page",
"elements": {
"page": {
"type": "Stack",
"props": { "gap": "sm" },
"children": ["lead", "body", "fine", "accent"]
},
"lead": {
"type": "Text",
"props": { "text": "The rollout is on track.", "size": "lg" }
},
"body": {
"type": "Text",
"props": {
"text": "Line breaks are kept,\nso short notes read as written."
}
},
"fine": {
"type": "Text",
"props": {
"text": "Updated by @release-bot 5 minutes ago.",
"size": "sm",
"tone": "muted"
}
},
"accent": {
"type": "Text",
"props": {
"text": "New this month",
"tone": "accent",
"weight": "semibold"
}
}
}
}Team plan
$29
Per person each month, billed yearly.
pnpm add artifacts
Show JSONHide JSON
{
"version": 1,
"root": "page",
"elements": {
"page": {
"type": "Stack",
"props": { "gap": "sm" },
"children": ["eyebrow", "price", "caption", "command"]
},
"eyebrow": {
"type": "Text",
"props": { "text": "Team plan", "variant": "eyebrow" }
},
"price": {
"type": "Text",
"props": { "text": "$29", "size": "4xl", "weight": "semibold" }
},
"caption": {
"type": "Text",
"props": {
"text": "Per person each month, billed yearly.",
"variant": "caption"
}
},
"command": {
"type": "Text",
"props": { "text": "pnpm add artifacts", "variant": "mono" }
}
}
}PropsLink to this section
Generated from the zod schema the server validates with. Unknown props are ignored with a warning. Any prop can also be a dynamic value such as { "$state": "/path" }; it is checked again once it resolves.
| Prop | Type | Limits and defaults |
|---|---|---|
| textrequired | string | max 5,000 chars |
| variant | "body" | "eyebrow" | "caption" | "mono" | — |
| tone | "default" | "muted" | "info" | "success" | "warning" | "danger" | "accent" | — |
| size | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | — |
| weight | "normal" | "medium" | "semibold" | — |
| align | "start" | "center" | "end" | — |
| clamp | integer | 1–3 |
| announce | boolean | — |
RulesLink to this section
- A
variantsets a size and a tone;sizeandtonestill win when given. tone: default, muted, a status tone (info, success, warning, danger), or accent, the accent color for words that are not a status: the theme's own accent, or blue on the default palette, whose accent is its text color. Every tone reads on every Box surface and in every theme; on a primary surface, which is the accent, accent text takes that surface's text color.clampcuts the text off after that many lines with an ellipsis. The full text stays in the page for screen readers.announcespeaks the text to screen readers when it appears after a reader's action, such as a line a button press shows throughvisible, and again when its words change. Text that is there when the interface is first drawn is not spoken. Do not set it on text that follows typing: it would speak on every key, and validation warns about it (announce_follows_typing). Mark one element for each action: when two appear together, only the last is spoken.
Children and eventsLink to this section
Text is a leaf: it does not show children. Validation warns when a leaf has some; wrap them in a Stack or Card instead.
It emits no events.