Label

Form

Renders an accessible label tied to a form control.

npx shadcn@latest add label

Default

Pair a Label with its control using htmlFor or by nesting.

Preview
Live
tsx
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.

PropTypeDescription