Loading...
Loading...
The Label component provides accessible labels for form inputs and other interactive elements. Built on Radix UI for proper accessibility and keyboard navigation.
Must be at least 3 characters
import { Label } from '@/components/ui/label';
import { Input } from '@/components/ui/input';
// Basic label
<Label htmlFor="email">Email address</Label>
<Input type="email" id="email" />
// With Field component
<Field>
<Label htmlFor="username">Username</Label>
<Input type="text" id="username" />
<p className="text-sm text-pietra-vecchia">Helper text</p>
</Field>
// Required label
<Label htmlFor="required">
Required field <span className="text-red-500">*</span>
</Label>
<Input type="text" id="required" required />