Components
'use client';
import { Checkbox } from '@/registry/san-francisco/ui/checkbox';
export default function CheckboxDemo() {
return (
<div className="flex items-center gap-2">
<Checkbox id="terms" />
<label htmlFor="terms" className="text-sm">
Accept terms and conditions
</label>
</div>
);
}
bunx shadcn@latest add @sft-ui/checkbox
'use client';
import { Checkbox } from '@/registry/san-francisco/ui/checkbox';
export default function CheckboxDemoDefault() {
return <Checkbox />;
}
'use client';
import { Checkbox } from '@/registry/san-francisco/ui/checkbox';
export default function CheckboxDemoChecked() {
return <Checkbox defaultChecked />;
}
'use client';
import { Checkbox } from '@/registry/san-francisco/ui/checkbox';
export default function CheckboxDemoDisabled() {
return (
<div className="flex items-center gap-2">
<Checkbox id="disabled" disabled />
<label htmlFor="disabled" className="text-muted-foreground text-sm">
Disabled
</label>
</div>
);
}
See the Base UI Checkbox documentation for the API reference.