Draft. Ported from the shadcn-vue Label and restyled with Beehexa tokens on 12 November 2026. Not yet approved.
A label is the visible name of a form control. It is linked to the control, so screen readers say it and a click on it reaches the control.
When to use
- On every form control: text fields, selects, checkboxes, radios, switches.
- Inside a form, use Field (
FieldLabel) or Form (FormLabel). Both are this Label with the field layout around it.
When not to use
- To label a group of checkboxes or radios. Use a field set with a legend (Field).
- For text that is not a control’s name, such as a heading or a status. A status uses a label-shaped badge, not this component.
Writing
- A noun or a short phrase, in sentence case, with no colon: “Store name”, “Sync schedule”.
- Beside a checkbox, say what happens when it is checked: “Email me when a sync fails”.
- Say “(optional)” after the few fields that are optional, rather than marking every required one.
Placement
- Above a text field, select or text area, 8 px away (
space.100). - To the right of a checkbox, radio or switch, 8 px away.
Tokens
| Part | Tokens |
|---|---|
| Text | font.label.default (14/20, Vietnamese 14/24), color.text |
| Next to a disabled control | color.text.disabled |
| Gap to a control beside it | space.100 |
Labels keep color.text when the field has an error: labels are read in full and need 7:1 (D4). The field’s edge and the error message show the error.