Price

The price component shows the cost of flights, hotels and hire cars in a range of global currencies.

Price

Maven Central Class reference Source code

Default

Day Night
Price component Price component - dark mode

Installation

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

Usage

Example of a Price:


                                                
                                                import net.skyscanner.backpack.compose.price.BpkPrice
                                                import net.skyscanner.backpack.compose.price.BpkPriceAlign
                                                import net.skyscanner.backpack.compose.price.BpkPriceSize
                                                
                                                BpkPrice(
                                                  price = "£1,830",
                                                  previousPrice = "£2,033",
                                                  leadingText = "App only deal",
                                                  trailingText = "per day",
                                                  size = BpkPriceSize.Large,
                                                  align = BpkPriceAlign.End,
                                                )