Checkbox

Checkboxes allow the user to select one or more items from a set.

Checkbox

Maven Central Class reference Source code

Default

Day Night
Checkbox component Checkbox component - dark mode

Installation

Backpack Android is available through Maven Central. Check the main Readme for a complete installation guide.

Usage

The Checkbox component can be used in both XML and Kotlin/Java

Example of a checkbox in XML


                                                
                                                <net.skyscanner.backpack.checkbox.BpkCheckbox
                                                  android:layout_width="wrap_content"
                                                  android:layout_height="wrap_content"/>

Example of a checkbox in Kotlin


                                                
                                                import net.skyscanner.backpack.checkbox.BpkCheckbox
                                                
                                                BpkCheckbox(context).apply {
                                                  isChecked = true
                                                }

Theme Props

  • checkboxColorChecked
  • checkboxColorDisabled
  • checkboxColor

Styles can be changed globally through bpkCheckboxStyle. Check theming for more information.