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

Label

Label is the semantic label primitive for form fields.

Root Props

PropTypeDefault
sizeLabelSize'md'
Visual size of the label text. Typically maps to type scale values in a design system.
htmlForstring—
Associates the label with an input by its id. Enables native focus and screen reader linking.
refRef<HTMLSpanElement>—
Ref to the underlying <span> or slotted element. Useful for measuring, focusing, or DOM manipulation.
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 | 900500
Font weight applied to the text. Common values: 400: Regular; 500: Medium; 600: Semi-bold; 700: Bold; 900: Extra bold

Also accepts all <label> attributes.

Child Parts

  • None. Label is a single exported primitive.

Types

  • LabelProps

State Model

  • Label has no controlled state.
  • Click behavior is delegated to native label semantics and the associated control.