Web · Components
Label
Form field label.
2 exports
Import
Form field label. Link it to the field with htmlFor or put the field inside it. It fades while the linked field is disabled (inside the same group or before it as a peer).
With tooltip, an ⓘ icon is added next to the label. Since the label itself can't be focused and tapping it on mobile focuses the field, the hint opens on this icon instead of the label, so everyone can reach it.
Examples
LabelProps
interfaceProps of the Label component.
Extends: ComponentProps<"label">
| Name | Type | Description |
|---|---|---|
tooltip? | TooltipProp | Hint shown with a small ⓘ icon next to the label (e.g. why the field is requested). The icon opens on mouse hover, on keyboard focus and on tap on mobile. See TooltipProp and InfoTip. |