Checkbox

A control that toggles between checked, unchecked and indeterminate.

Installation

  1. Add the registryOnce per project
  2. Add checkbox

Usage

Label a checkbox with a FieldLabel in a horizontal Field. Without visible text, give it an aria-label. For several checkboxes with one shared value, use Checkbox Group.

Examples

With a description

One email a month. Unsubscribe at any time.

States

Use defaultChecked, or checked with onCheckedChange to control it. indeterminate shows a dash for a partial selection, and aria-invalid marks the checkbox as invalid.

Props

The tables leave out className, style and render. Parts built on Base UI take them as its styling and composition guides describe.

Checkbox