Label
shadcn/uiRenders an accessible label associated with controls.
Installation
Props
<Label />
Name
Type
className
string
htmlFor
string
Search for a command to run...
Renders an accessible label associated with controls.
import { Label } from "@/registry/optics/label";import { Input } from "@/registry/optics/input";<div className="flex flex-col gap-2"> <Label htmlFor="email">Email</Label> <Input id="email" type="email" placeholder="Enter your email" /></div>import { Label } from "@/registry/optics/label";import { Input } from "@/registry/optics/input";<div className="flex flex-col gap-2"> <Label htmlFor="email">Email</Label> <Input id="email" type="email" placeholder="Enter your email" /></div>