Components
Text
A versatile text component with semantic variants and sizes.
Demo
Code
Typography
The quick brown fox jumps over the lazy dog.
Installation
Usage
Basic Usage
Variants
Sizes
Each variant has its own size scale:
Alignment
API Reference
Text
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'default' | 'header' | 'title' | 'label' | 'body' | 'caption' | 'muted' | 'error' | 'success' | 'default' | Text variant |
size | 'sm' | 'md' | 'lg' | 'xl' | 'md' | Text size |
align | 'left' | 'center' | 'right' | 'left' | Text alignment |
className | string | — | Additional classes |
All standard React Native Text props are also supported.
Size Mapping by Variant
| Variant | sm | md | lg | xl |
|---|---|---|---|---|
| header | 24px | 30px | 36px | 48px |
| title | 18px | 20px | 24px | 30px |
| label | 12px uppercase | 14px uppercase | 16px uppercase | — |
| body | 14px | 16px | 18px | — |
| default | 14px | 16px | 18px | — |
| muted | 14px | 16px | 18px | — |
| caption | 12px | 14px | 16px | — |
| error | 14px | 16px | 18px | — |
| success | 14px | 16px | 18px | — |