Accessible label for form controls.
Default label for input fields.
import { Label } from "@/components/ui/label" export function LabelDemo() { return ( <div className="grid gap-1.5"> <Label htmlFor="email">Email</Label> <Input type="email" id="email" placeholder="Email" /> </div> ) }
Prop | Type | Default | Description |
---|---|---|---|
htmlFor | string | - | Associates the label with a form control. |
disabled | boolean | - | Whether the label is disabled. |