Skip to main content

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 bar
Live demo
Open ↗

When 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​

PropTypeRequiredDescription
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.
iconReact.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.
measureboolean—Cap width to the readable measure (~68ch).
monoboolean—Monospace face with tabular figures — admission and reference numbers.
childrenReact.ReactNode—
classNamestring—