Form controls

Checkbox
v1.1.3
Ready for Production

A compact three-state checkbox component optimized for data-dense product interfaces. Built on Radix UI primitives with accessible keyboard navigation and WCAG 2.2 AA compliance.

Prefer AI-assisted development?

This documentation is available via the Catalyst MCP Server. Learn how to connect →

Catalyst Checkbox extends Radix UI's Checkbox primitive with built-in CVA variants, design tokens, and three-state support — giving you a production-ready checkbox with compact sizing for data-dense product interfaces.

Preview

Installation

npm install @pmi/catalyst-checkbox
import { CheckboxRoot, CheckboxIndicator } from '@pmi/catalyst-checkbox';

Variants

Checked

Preview

Unchecked

Preview

Indeterminate

Preview

Sizes

Three compact sizes are available, optimized for data-dense interfaces: sm (20 px), md (24 px, default), and lg (28 px).

Preview

Common Patterns

Danger State

Use the danger prop to indicate validation errors or required selections.

Preview

Disabled State

Preview

With Label

Pair checkboxes with a Label component using aria-labelledby for accessible association.

Preview

With Helper Text

Combine a label and helper text to provide additional context or validation messages.

Preview
Sub-text goes here

API Reference

Checkbox is a compound component built on Radix UI primitives. The sections below summarize the shared API surface for each part of the component.

CheckboxRoot

The interactive checkbox button. Accepts all standard Radix Checkbox Root props and forwards ref.

Prop

Type

CheckboxIndicator

Container for the checkbox icon (checkmark or minus). Renders only when the checkbox is checked or indeterminate. Accepts all standard Radix Checkbox Indicator props and forwards ref.

Accessibility

Keyboard Interactions

KeyAction
SpaceToggles the checkbox state
TabMoves focus to the next element

ARIA

  • The component uses role="checkbox" and sets aria-checked to "true", "false", or "mixed" for the indeterminate state — inherited from Radix UI.
  • Always pair a checkbox with a visible label. Use aria-labelledby pointing to the label's id, or wrap both in a native <label>.
  • When using the danger prop, pair it with a HelperText component that describes the error so screen readers announce the error context.

See the Radix Checkbox accessibility docs for inherited baseline behavior.

Choosing the Right Component

Use Checkbox when users need to independently toggle one or more options on or off. Reach for a different primitive when:

If you need…Use instead
A single on/off toggle with an immediate visual effectSwitch
A mutually exclusive selection from a set of optionsRadio Group
A confirmation action in a dialog or form submitButton

On this page