Jenga Navigation Rail Item
A full-width destination row for a side navigation list (e.g. the rail of a landscape or tablet layout): an icon and a label, with a filled background when selected. Stack items in a column; the caller owns the layout.
Parameters
the destination name.
whether this item is the current destination.
called when the item is tapped.
the destination icon; inherits the content color.
the Modifier for this item.
whether the item is interactive.
whether a small attention dot follows the label.
the minimum item height; defaults to the theme's value, else JengaNavigationRailItemDefaults.MinHeight.
the item shape.
padding inside the item.
the label text style.
the label text style while selected; defaults to textStyle with the theme's JengaNavigationRailItemStyle.selectedTextStyle merged on top.
the color set; defaults to JengaNavigationRailItemDefaults.colors.
Samples
var selected by remember {
mutableIntStateOf(
value = 0,
)
}
Column(
content = {
JengaNavigationRailItem(
label = "Tickets",
selected = selected == 0,
onClick = { selected = 0 },
icon = {
JengaIcon(
imageVector = JengaIcons.Ticket,
contentDescription = null,
)
},
)
JengaNavigationRailItem(
label = "Work orders",
selected = selected == 1,
onClick = { selected = 1 },
icon = {
JengaIcon(
imageVector = JengaIcons.Wrench,
contentDescription = null,
)
},
showDot = true,
)
},
)