Label
An accessible label for form controls. Built on Radix UI Label.
With Input
With Checkbox
Usage
Always use a Label for every form control. The htmlFor attribute must match the input's id for accessibility.
Labels automatically handle disabled styling when paired with a disabled peer input.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| htmlFor | string | — | ID of the associated form control |
| className | string | — | Additional CSS classes |