Skip to main content
The Checkbox component provides a customizable checkbox with support for checked, unchecked, and indeterminate states.

Installation

Usage

Components

Checkbox (Root)

boolean
Controlled checked state.
boolean
Default checked state for uncontrolled usage.
function
Callback when checked state changes.
boolean
Disables the checkbox.
boolean
Sets the checkbox to indeterminate state.

CheckboxIndicator

boolean
Keep the indicator mounted when unchecked.
The indicator automatically shows a check icon when checked and a minus icon when indeterminate.

Examples

Basic Usage

With Label

Controlled

Indeterminate State

Accessibility

  • Built on @base-ui/react for full ARIA support
  • Keyboard accessible (Space to toggle)
  • Focus visible ring
  • Proper checked/unchecked/indeterminate states
  • Works with labels via htmlFor