Components · Typography
Text
Paragraph text component with size, tone, and weight variants.
import { Text } from '@nexub/react';Playground
Props
The Nexub design system provides accessible, token-driven components.
<Text>The Nexub design system provides accessible, token-driven components.</Text>Examples
Default
Sizes
Tones
States
The Nexub design system provides accessible, token-driven components.
defaultThe Nexub design system provides accessible, token-driven components.
size="label"The Nexub design system provides accessible, token-driven components.
size="body"The Nexub design system provides accessible, token-driven components.
size="caption"The Nexub design system provides accessible, token-driven components.
size="body-lg"The Nexub design system provides accessible, token-driven components.
size="body-sm"The Nexub design system provides accessible, token-driven components.
tone="success"The Nexub design system provides accessible, token-driven components.
tone="warning"The Nexub design system provides accessible, token-driven components.
tone="subtle"The Nexub design system provides accessible, token-driven components.
tone="danger"The Nexub design system provides accessible, token-driven components.
tone="default"The Nexub design system provides accessible, token-driven components.
tone="muted"The Nexub design system provides accessible, token-driven components.
tone="inverse"The Nexub design system provides accessible, token-driven components.
tone="secondary"
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| size | 'label' | 'body' | 'caption' | 'body-lg' | 'body-sm' | 'body' | Controls the font size and line height. |
| tone | 'success' | 'warning' | 'subtle' | 'danger' | 'default' | 'muted' | 'inverse' | 'secondary' | 'default' | Color tone applied to the text. The status tones (11.1) meet 4.5:1 on every surface. |
| weight | 'bold' | 'regular' | 'medium' | 'semibold' | — | Font weight of the text. |
| truncate | boolean | false | Truncates text with an ellipsis when it overflows. |
| lineClamp | number | — | Clamps the text to a maximum number of lines. |
| asChild | boolean | false | Merges props onto the immediate child element (Radix Slot). |