Chip

Chips let travellers enter information, filter options, make choices, and ultimately take action.

Chip

Maven Central Class reference Source code

Default

Day Night
Chip component Chip component - dark mode

On dark

Day Night
On dark Chip component On dark Chip component - dark mode

On Image

Day Night
On Image Chip component On Image Chip component - dark mode

Installation

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

Usage

Example of a Chip:


                                                
                                                import net.skyscanner.backpack.compose.chip.BpkChip
                                                
                                                BpkChip(
                                                  text = "Chip text",
                                                )

Example of a selected Chip:


                                                
                                                import net.skyscanner.backpack.compose.chip.BpkChip
                                                
                                                BpkChip(
                                                  text = "Chip text",
                                                  selected = selected,
                                                  onSelectedChange = { selected -> },
                                                )

Example of a disabled Chip:


                                                
                                                import net.skyscanner.backpack.compose.chip.BpkChip
                                                
                                                BpkChip(
                                                  text = "Chip text",
                                                  enabled = false,
                                                )

Example of a Chip with leading icon:


                                                
                                                import net.skyscanner.backpack.compose.chip.BpkChip
                                                import net.skyscanner.backpack.compose.icon.BpkIcon
                                                import net.skyscanner.backpack.compose.tokens.Deals
                                                
                                                BpkChip(
                                                  text = "Chip text",
                                                  icon = BpkIcon.Deals,
                                                )

Example of a Chip on dark background:


                                                
                                                import net.skyscanner.backpack.compose.chip.BpkChip
                                                import net.skyscanner.backpack.compose.chip.BpkChipStyle
                                                
                                                BpkChip(
                                                  text = "Chip text",
                                                  style = BpkChipStyle.OnDark,
                                                )

Example of a dropdown chip:


                                                
                                                import net.skyscanner.backpack.compose.chip.BpkChip
                                                
                                                BpkDropdownChip(
                                                  text = "Chip text",
                                                )

Example of a dismissible chip:


                                                
                                                import net.skyscanner.backpack.compose.chip.BpkChip
                                                
                                                BpkDismissibleChip(
                                                  text = "Chip text",
                                                )