Umbra UI

Checkbox

A tri-state checkbox with an optional inline label.

Staticimport { Checkbox } from 'umbra-ui'

Props

PropTypeDefaultDescription
children ReactNode—Inline label. When present the root element is a `<label>` that receives `className`; other props go to the control.
invalid boolean—Marks the control as invalid (sets `aria-invalid`). Inherited from FormField when omitted.

Usage notes

Pass children for an inline label. checked accepts true, false or "indeterminate".

Accessibility

  • role="checkbox" with aria-checked (mixed when indeterminate); Space toggles.
  • With children the root is a <label>, so the text is clickable and names the control.
  • A 24×24 hit area surrounds the 16px box (WCAG 2.5.8).

Import

import { Checkbox } from 'umbra-ui';
import 'umbra-ui/styles.css'; // once, at the root of your app