Components
npx shadcn@latest add https://21st.dev/r/ShadcnStudio/checkbox-1Loading preview...
import { useId } from 'react'
import { Checkbox } from '@/components/ui/checkbox'
import { Label } from '@/components/ui/label'
const CheckboxDescriptionDemo = () => {
const id = useId()
return (
<div className='flex items-start gap-2'>
<Checkbox id={id} defaultChecked />
<div className='grid gap-2'>
<Label htmlFor={id} className='leading-4'>
Accept terms and conditions
</Label>
<p className='text-muted-foreground text-xs'>
By clicking this checkbox, you agree to the terms and conditions.
</p>
</div>
</div>
)
}
export default CheckboxDescriptionDemo
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...