Text

Body text with size, weight, and muted variants

Category: display · WCAG 2.2-AA · typography, text, paragraph, body

Variants

Sizes

Props

PropTypeDefaultDescription
as'p' | 'span' | 'div'p`p` for a paragraph, `span` for inline text, `div` for a block that imposes no semantics of its own.
size'sm' | 'md' | 'lg'mdVisual size of the component (e.g. 'sm', 'md', 'lg').
weight'normal' | 'medium' | 'semibold'normalFont weight ('normal' | 'medium' | 'semibold').
mutedbooleanfalseWhen true, renders in a muted/subtle color. `Text` has no `tone` prop: `tone` is the severity vocabulary (Status, Badge, Timeline, SideNav); text emphasis is `muted`.

Design tokens

When to use

When not to use

How to build an accessible Text in React →

Examples

Default

<Text>Body copy reads at the base size.</Text>

Muted helper

<Text size="sm" muted>Secondary information</Text>

Inline span

Use as="span" inside other flow content

<Text as="span" weight="semibold">emphasis</Text>

Icon beside text

Text renders a <p> by default, so a nested Text needs as="span" — a <p> inside a <p> is invalid HTML and the browser silently closes the outer one, breaking the layout.

<Text>
  <CheckIcon aria-hidden />
  <Text as="span" weight="semibold">Deployed</Text>
</Text>

Related components

← Back to docs