Text
Body & inline copy at a role size, with optional tone, measure and mono.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
Body & inline copy at a role size, with optional tone, measure and mono.
Accessibility
Use semantic elements (as/level) so structure—not just size—conveys hierarchy. Respect the reader’s line-length and contrast settings.
Install and import
npx shadcn@latest add @prism/text
import { Text } from '@/components/prism/Text';
In a no-build prototype, read it from the bundle instead: const { Text } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
size | "lead" | "body-lg" | "body" | "body-sm" | "small" | "caption" | — | Role size. lead is an intro paragraph; caption/small are sub-body. |
tone | "secondary" | "tertiary" | "accent" | "positive" | "notice" | "negative" | "info" | — | Optional color tone. Omit for the default per-size color. |
icon | React.ReactNode | — | An icon beside the text, aligned with its first line and coloured like the text. Decorative (aria-hidden) — the text carries the meaning. |
as | "p" | "span" | "div" | — | Element to render. Default p; use span for inline. |
measure | boolean | — | Cap width to the readable measure (~68ch). |
mono | boolean | — | Monospace face with tabular figures — admission and reference numbers. |
children | React.ReactNode | — | |
className | string | — |