Components · Typography
Text
StableSince v0.0.1
Paragraph text component with size, tone, and weight variants.
import { Text } from '@nexub/react';Examples
Default
Sizes
Tones
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| size | 'body-lg' | 'body' | 'body-sm' | 'caption' | 'label' | 'body' | Controls the font size and line height. |
| tone | 'default' | 'secondary' | 'muted' | 'subtle' | 'inverse' | — | Color tone applied to the text. |
| weight | 'regular' | 'medium' | 'semibold' | 'bold' | — | Font weight of the text. |
| truncate | boolean | — | Truncates text with an ellipsis when it overflows. |
| lineClamp | number | — | Clamps the text to a maximum number of lines. |
| asChild | boolean | — | Merges props onto the immediate child element (Radix Slot). |
On iOS & Android
Web only
Text has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.