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 Compose is available through Maven Central. Check the main Readme for a complete installation guide.

Usage

Example of a Checkbox:


                                                
                                                import net.skyscanner.backpack.compose.checkbox.BpkCheckbox
                                                
                                                BpkCheckbox(
                                                  text = "Checkbox text",
                                                  checked = true,
                                                  onCheckedChange = { checked -> },
                                                )

Example of a Checkbox with intermediate state:


                                                
                                                import net.skyscanner.backpack.compose.checkbox.BpkCheckbox
                                                
                                                BpkCheckbox(
                                                  text = "Checkbox text",
                                                  checked = true,
                                                  onCheckedChange = { checked -> },
                                                )

Example of a Checkbox with custom content:


                                                
                                                import net.skyscanner.backpack.compose.checkbox.BpkCheckbox
                                                
                                                BpkCheckbox(
                                                  checked = true,
                                                  onCheckedChange = { checked -> },
                                                ) { checked ->
                                                    MyCustomContent()
                                                }