Checkbox
Checkbox is a form control for toggling options on and off. Use it standalone or group multiple checkboxes together.
3
Sizes
3
Radius
3
States
Radix
Base
Playground
Preview
Dr=sm16px
Size
Color
Weight
Radius
Checked
Items
Options
<Checkbox
label="Email"
/>Sizes
smBox14px
Icon10px
Font12px
Gap6px
Click24px
defaultBox16px
Icon12px
Font14px
Gap8px
Click32px
lgBox20px
Icon14px
Font16px
Gap10px
Click36px
| Size | Box | Icon | Font | Gap | Click Area | Preview |
|---|---|---|---|---|---|---|
sm | 14px | 10px | 12px | 6px | 24px | |
default | 16px | 12px | 14px | 8px | 32px | |
lg | 20px | 14px | 16px | 10px | 36px |
Features
With Field
Combine with the Field component to automatically inherit disabled state.
<Field>
<Field.Label>Notifications</Field.Label>
<div className="flex flex-col gap-2">
<Checkbox defaultChecked label="Email" />
<Checkbox label="Push" />
<Checkbox label="SMS" />
</div>
</Field><Field>
<Field.Label>Notifications</Field.Label>
<div className="flex gap-6">
<Checkbox defaultChecked label="Email" />
<Checkbox label="Push" />
<Checkbox label="SMS" />
</div>
</Field>States
Unchecked
Checked
Indeterminate
Disabled
Disabled On
<Checkbox />
<Checkbox defaultChecked />
<Checkbox checked="indeterminate" />
<Checkbox disabled />
<Checkbox disabled defaultChecked />API
Props
checkedundefinedboolean | "indeterminate"Checked state for controlled mode
defaultCheckedundefinedbooleanInitial checked state for uncontrolled mode
onCheckedChangeundefined(checked: boolean | "indeterminate") => voidCallback on state change
size"default""sm" | "default" | "lg"Checkbox size (14/16/20px)
radius"sm""none" | "sm" | "md"Border radius (none: 0px / sm: 2px / md: 4px)
weight"bold""thin" | "bold"Border thickness (thin: 1px / bold: 2px)
color"default""default" | "primary"Fill color for checked/indeterminate state
labelundefinedstringCheckbox label text
disabledundefinedbooleanDisabled state
requiredundefinedbooleanRequired field
nameundefinedstringForm name attribute
value"on"stringForm value attribute
| Name | Type | Default | Description |
|---|---|---|---|
checked | boolean | "indeterminate" | undefined | Checked state for controlled mode |
defaultChecked | boolean | undefined | Initial checked state for uncontrolled mode |
onCheckedChange | (checked: boolean | "indeterminate") => void | undefined | Callback on state change |
size | "sm" | "default" | "lg" | "default" | Checkbox size (14/16/20px) |
radius | "none" | "sm" | "md" | "sm" | Border radius (none: 0px / sm: 2px / md: 4px) |
weight | "thin" | "bold" | "bold" | Border thickness (thin: 1px / bold: 2px) |
color | "default" | "primary" | "default" | Fill color for checked/indeterminate state |
label | string | undefined | Checkbox label text |
disabled | boolean | undefined | Disabled state |
required | boolean | undefined | Required field |
name | string | undefined | Form name attribute |
value | string | "on" | Form value attribute |
Anatomy
1
2
3
4
I agreestate
checked · unchecked · indeterminate1
Root
Flex container
2
Box
Checkbox body
3
Checkmark
Shown when checked
4
Label
Option text
Best Practices
✓
Do
- ✓Use with clear labels
- ✓Use for multi-select scenarios
- ✓Use indeterminate for group select-all
- ✓Combine with Field for required items
✕
Don't
- ✗Don't use Checkbox for exclusive selection (use Radio)
- ✗Use Switch for immediate-effect toggles
- ✗Don't use without a label
- ✗Consider Select for too many options
Accessibility
Keyboard
SpaceToggle check
TabMove focus
ARIA Attributes
role="checkbox"Auto-appliedaria-checkedtrue/false/mixed- Focus indicator
labelexpands click area