Checkbox

A two-state check box that switches between On and Off.

  • onCheckedChange may be nullable, but if it's null the checkbox is basically disabled because in Compose, widgets don't change state by itself.
Compose Multiplatform

Tri-State Checkbox

A three-state checkbox that can switch between On, Off and Indeterminate.

  • onClick may be nullable, but if it's null the checkbox is basically disabled because in Compose, widgets don't change state by itself.
  • onClick does not pass any parameters. You must read the state yourself.
  • state does not update automatically when clicked. You must change it yourself.
Compose Multiplatform

Color Customizations

Colors can be customized via CheckboxDefaults.colors().

  • !: CheckboxDefaults.color() does not expose all color parameters. However, this can be circumvented via CheckboxDefaults.color().copy().
Compose Multiplatform