Checkbox

Checkbox with spectre styling built on Radix UI Checkbox. Supports labels, controlled and uncontrolled checked state, and disabled styling.

Basic

Preview

Default Checked

Preview

Disabled

Preview

Props

PropTypeDefaultDescription
labelstring-Label text displayed next to the checkbox.
defaultCheckedbooleanfalseDefault checked state for uncontrolled usage.
checkedboolean-Controlled checked state.
onCheckedChange(checked: boolean) => void-Callback fired when the checked state changes.
disabledbooleanfalseWhether the checkbox is disabled.
classNamestring-Additional CSS classes.

Accessibility

  • Built on Radix UI Checkbox which provides full WAI-ARIA checkbox pattern compliance
  • Label is associated with the checkbox for screen reader support
  • Togglable via Space key when focused
  • Checked state is conveyed to assistive technology via aria-checked
  • Disabled state prevents interaction and is communicated to assistive technology