← Back to Design System
Checkbox
A control that allows users to select one or multiple options, including an indeterminate state.
Base
<Checkbox />
<Checkbox defaultChecked />Disabled
<Checkbox disabled />
<Checkbox defaultChecked disabled />Sizes
<Checkbox size="sm" defaultChecked />
<Checkbox size="md" defaultChecked />States
<Checkbox />
<Checkbox defaultChecked />
<Checkbox checked="indeterminate" />Form Integration
<CheckboxForm
control={form.control}
name="terms"
label="Accept terms and conditions"
description="You must accept before submitting."
/>API Reference
Checkbox
| Props | Type | Default | Description |
|---|---|---|---|
| size? | "sm" | "md" | "sm" | Size of the checkbox. |
| checked? | boolean | 'indeterminate' | - | The controlled state of the switch. Must be used in conjunction with onCheckedChange. |
| onCheckedChange? | funtion[ (checked: boolean) => void] | - | Event handler called when the state of the switch changes. |
| defaultChecked? | boolean | false | Initial unchecked/checked state. |
| className? | string | - | Additional styles for checkbox. |
CheckboxForm
The following props plus reac-hook-form props (name, control...) and all Checkbox props execpt defaultChecked, checked and onCheckedChange
| Props | Type | Default | Description |
|---|---|---|---|
| label? | string | - | Form label |
| labelTooltip? | string | - | Form label tooltip |
| description? | string | - | Form description |
| isRequired? | boolean | false | To indicate requirement to users. |
| wrapperClassName? | string | - | Additional styles for Ckexbox, label and description wrapper. |