Text

Body text with semantic element, size, weight, and tone controls.

Add it to your project

Eject the complete text group, then import from its generated local barrel. The copied source and CSS belong to your application.

bash
pnpm exec toucan eject text
app.tsx
import { Text } from '@/components/toucan/text';

Use when

Copy needs Toucan typography while retaining appropriate HTML semantics.

Avoid when

The text introduces a document section; use Heading.

Example

Large body text for emphasis.

Default body text for content paragraphs.

Small muted text for captions and metadata.

API reference

Generated from packages/react/src/components. Only Toucan-specific props are listed; forwarded native props remain available as noted for each export.

Text

Text

Props type: TextProps

NameTypeDefaultRequiredDescription
align"left" | "right" | "center"undefinedNoAlignment within the component layout.
as"p" | "span" | "label" | "small" | "strong" | "em" | "div"'p'NoThe HTML element rendered by the component.
monobooleanfalseNoUse the monospace font family.
mutedbooleanfalseNoUse the muted text treatment.
size"xs" | "sm" | "lg" | "base"'base'NoVisual size variant.
variant"default" | "muted" | "accent"undefinedNoSemantic visual variant.
weight"regular" | "medium" | "semibold" | "bold"undefinedNoTypography weight.

Also accepts the native HTML element attributes that are not replaced by a Toucan prop.

Type exports

TextProps

Accessibility

  • Choose the as element for meaning; visual size does not change semantics.

Token families

textbody

Related components