Kaapi UI
← 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

You must accept before submitting.

<CheckboxForm
  control={form.control}
  name="terms"
  label="Accept terms and conditions"
  description="You must accept before submitting."
/>

API Reference

Checkbox

PropsTypeDefaultDescription
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?booleanfalseInitial 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

PropsTypeDefaultDescription
label?string-Form label
labelTooltip?string-Form label tooltip
description?string-Form description
isRequired?booleanfalseTo indicate requirement to users.
wrapperClassName?string-Additional styles for Ckexbox, label and description wrapper.