Radio button

A radio button allows a traveller to select a single value from a small set of options.

RadioButton

Maven Central Class reference Source code

Default

Day Night
RadioButton component RadioButton component - dark mode

Installation

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

Usage

Example of a RadioButton:


                                                
                                                import net.skyscanner.backpack.compose.radiobutton.BpkRadioButton
                                                
                                                BpkRadioButton(
                                                  text = "Radiobutton text",
                                                  selected = true,
                                                  onClick = { },
                                                )

Example of a RadioButton with custom content:


                                                
                                                import net.skyscanner.backpack.compose.radiobutton.BpkRadioButton
                                                
                                                BpkRadioButton(
                                                  selected = true,
                                                  onClick = { },
                                                ) { selected ->
                                                  MyCustomContent()
                                                }