Provides a text label for form elements to improve clarity and accessibility.
'use client'; import { useId } from 'react'; import { Label } from '@/components/ui/label'; import { Checkbox } from '@/components/ui/checkbox'; export default function LabelDemo() { const id1 = useId(); return ( <div> <div className="flex items-center space-x-2"> <Checkbox id="terms" /> <Label htmlFor="terms">Accept terms and conditions</Label> </div> </div> ); }
Part of ReUI — browse the full library on 21st.dev.