Checkbox
A styled checkbox component.
Installation
import { Checkbox } from '@smc/darwin-ui';npx shadcn add https://darwin-ui.mandalsuraj.com/registry/checkbox.jsonUsage
import { Checkbox } from '@smc/darwin-ui';
export function Example() { const [checked, setChecked] = useState(false);
return ( <Checkbox label="Accept terms" checked={checked} onCheckedChange={setChecked} /> );}API Reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | Checkbox label |
checked | boolean | false | Checked state |
onCheckedChange | (checked: boolean) => void | - | Change handler |
disabled | boolean | false | Disable checkbox |