NavigationTabGroup
Default
Day | Night |
---|---|
Installation
Backpack Compose is available through Maven Central. Check the main Readme for a complete installation guide.
Usage
Example of a NavigationTabGroup:
import net.skyscanner.backpack.compose.navigationtabgroup.BpkNavigationTabGroup
import net.skyscanner.backpack.compose.navigationtabgroup.BpkNavigationTabItem
val tabs = listOf(
BpkNavigationTabItem("Flights", BpkIcon.Flight),
BpkNavigationTabItem("Hotels", BpkIcon.Hotels),
BpkNavigationTabItem("Cars", BpkIcon.Cars),
)
var selectedIndex by remember { mutableStateOf(0) }
BpkNavigationTabGroup(
tabs = tabs,
selectedIndex = selectedIndex,
onItemClicked = { selectedIndex = tabs.indexOf(it) },
style = BpkNavigationTabGroupStyle.CanvasDefault,
)