Skip to main content

Common Examples

To use the Checkbox, import it from @servicetitan/anvil2-ai-kit and pass a visible label, or omit label and supply exactly one of aria-label or aria-labelledby.

Selection

Use isSelected with onChange for controlled selection, or defaultSelected for uncontrolled.

Indeterminate

isIndeterminate is a display-only mixed state for select-all rows. Derive it from child selection in your own logic.

Label and indicator-only

A visible label is the accessible name. For dense rows, omit label and name the control with aria-label or aria-labelledby. Never pass both naming attributes.

Disabled

isDisabled dims the control and blocks interaction in either selection state.

React Accessibility

  • Supply a visible label, or exactly one of aria-label or aria-labelledby.
  • Keyboard focus draws a ring on the square indicator, not the full label width.
  • Users toggle a focused checkbox with Space.
Last modified on August 28, 2026