Label
FormRenders an accessible label tied to a form control.
npx shadcn@latest add labelDefault
Pair a Label with its control using htmlFor or by nesting.
Preview
Livetsx
1<div className="space-y-1">2 <Label htmlFor="name">Full name</Label>3 <Input id="name" placeholder="Ada Lovelace" />4</div>
API reference
All props of the underlying Base UI primitive are forwarded. The table below documents the Shelf-specific props.
| Prop | Type | Description |
|---|