FORMS
Label
Native <label> with the form-label typography baked in (text-xs font-semibold uppercase tracking-wider text-muted-foreground). Use it standalone when you don't need the structured wiring of FormField.
Import
Label + input pair
Props
Label props
| Prop | Type | Default | Description |
|---|---|---|---|
| htmlFor | string | — | Standard <label> association — when set, clicking the label focuses the field with the matching id. |
| children | ReactNode | — | Visible label text. |
| className | string | — | Tailwind classes are merged on top of the typography defaults. |
Accessibility
- Renders as a real
<label>. Pair with a form control viahtmlFor="controlId"matching the control'sid— clicking the label then focuses the control. - Alternatively wrap the control directly inside the label (implicit association). Either pattern is announced correctly by screen readers.
When to reach for FormField
For most product forms, FormField is preferable: it auto-wires htmlFor, aria-describedby, and aria-invalid based on description / error props. Reach for the standalone Label only when you have a one-off layout that needs custom positioning.