Root Props
| Prop | Type | Default |
|---|---|---|
size | TextSize | 3 |
| Visual size of the text, typically mapped to the design system’s type scale. | ||
asChild | boolean | — |
If true, renders the text as a child component using Slot. Useful for compatibility with native elements or other components. | ||
fontWeight | 400 | 500 | 600 | 700 | 900 | — |
| Font weight applied to the text. Common values: 400: Regular; 500: Medium; 600: Semi-bold; 700: Bold; 900: Extra bold | ||
ref | Ref<HTMLSpanElement> | — |
Ref to the underlying <span> or slotted element. Useful for measuring, focusing, or DOM manipulation. | ||
Also accepts all <span> attributes.
Child Parts
- None.
Textis a single exported primitive.
Types
TextPropsTextSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11
State Model
Texthas no controlled state.- All dynamic behavior comes from parent content or styling decisions.