Skip to content
v2.5.0
English
Русский
Documentation

Text

Text is the base body-typography primitive.

Root Props

PropTypeDefault
sizeTextSize3
Visual size of the text, typically mapped to the design system’s type scale.
asChildboolean—
If true, renders the text as a child component using Slot. Useful for compatibility with native elements or other components.
fontWeight400 | 500 | 600 | 700 | 900—
Font weight applied to the text. Common values: 400: Regular; 500: Medium; 600: Semi-bold; 700: Bold; 900: Extra bold
refRef<HTMLSpanElement>—
Ref to the underlying <span> or slotted element. Useful for measuring, focusing, or DOM manipulation.

Also accepts all <span> attributes.

Child Parts

  • None. Text is a single exported primitive.

Types

  • TextProps
  • TextSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11

State Model

  • Text has no controlled state.
  • All dynamic behavior comes from parent content or styling decisions.