---
id: checkbox
sidebar_label: 'Checkbox'
sidebar_position: 4
---
# Checkbox
A flexible checkbox component built on React Aria's `Checkbox` component with support for individual checkboxes and checkbox groups. Features indeterminate state, custom styling, and full accessibility support.
## Checkbox Props
| Prop | Type | Default | Description |
| ----------------- | ------------------------------- | ------- | ------------------------------------------------------------------- |
| `children` | `ReactNode` | - | **Required** - Label text or content displayed next to the checkbox |
| `isSelected` | `boolean` | `false` | Whether the checkbox is checked (controlled) |
| `defaultSelected` | `boolean` | `false` | Initial checked state (uncontrolled) |
| `isIndeterminate` | `boolean` | `false` | Whether to show indeterminate state (mixed/partial selection) |
| `onChange` | `(isSelected: boolean) => void` | - | Called when checkbox state changes |
| `isDisabled` | `boolean` | `false` | Whether the checkbox is disabled |
| `isReadOnly` | `boolean` | `false` | Whether the checkbox is read-only |
| `isRequired` | `boolean` | `false` | Whether the checkbox is required |
| `value` | `string` | - | Value used when checkbox is part of a group |
| `className` | `string` | - | Additional CSS classes for the checkbox container |
Extends all [React Aria CheckboxProps](https://react-spectrum.adobe.com/react-aria/Checkbox.html#props).
## CheckboxGroup Props
| Prop | Type | Default | Description |
| -------------- | ------------------------------------ | ------- | ---------------------------------------------- |
| `options` | `{ label: string; value: string }[]` | - | **Required** - Array of checkbox options |
| `value` | `string[]` | - | Array of selected values (controlled) |
| `defaultValue` | `string[]` | - | Initial selected values (uncontrolled) |
| `onChange` | `(value: string[]) => void` | - | Called when selection changes |
| `isDisabled` | `boolean` | `false` | Whether all checkboxes are disabled |
| `isReadOnly` | `boolean` | `false` | Whether all checkboxes are read-only |
| `isRequired` | `boolean` | `false` | Whether at least one checkbox must be selected |
Extends all [React Aria CheckboxGroupProps](https://react-spectrum.adobe.com/react-aria/CheckboxGroup.html#props).
## Usage Examples
### Basic Checkbox
```tsx live