Label
An accessible label that dims itself when its control is disabled.
InputsRadix Label
Playground
Tweak the props, the preview and the code follow.
Props
<Label htmlFor="email">Email address</Label> <Input id="email" />
Installation
Usage
import { Label } from "@/components/ui/label"<Label htmlFor="email">Email</Label>Examples
With input
Form hints
Required markers, counters, and disabled styling for free.
API Reference
Label
Extends Radix Label.Root. Pass htmlFor to link it to a control.
| Prop | Type | Default |
|---|---|---|
htmlForThe id of the associated control. | string | — |