Composable Function

NavigationSuiteItem

The default Material navigation item component according to the current NavigationSuiteType to be used with the NavigationSuite that accepts this function.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
@Composable
fun NavigationSuiteItem(
    selected: Boolean,
    onClick: () -> Unit,
    icon: @Composable () -> Unit,
    label: @Composable (() -> Unit)?,
    modifier: Modifier = Modifier,
    navigationSuiteType: NavigationSuiteType =
        NavigationSuiteScaffoldDefaults.navigationSuiteType(WindowAdaptiveInfoDefault),
    enabled: Boolean = true,
    badge: @Composable (() -> Unit)? = null,
    colors: NavigationItemColors? = null,
    interactionSource: MutableInteractionSource? = null,
)

The default Material navigation item component according to the current NavigationSuiteType to be used with the NavigationSuite that accepts this function.

For specifics about each navigation component, see ShortNavigationBarItem, WideNavigationRailItem, NavigationRailItem, and NavigationDrawerItem.

Parameters

selected whether this item is selected
onClick called when this item is clicked
icon icon for this item, typically an Icon
label the text label for this item
modifier the Modifier to be applied to this item
navigationSuiteType the current NavigationSuiteType of the associated NavigationSuite. Defaults to NavigationSuiteScaffoldDefaults.navigationSuiteType
enabled controls the enabled state of this item. When false, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services. Note: as of now, for NavigationDrawerItem, this is always true.
badge optional badge to show on this item
colors NavigationItemColors that will be used to resolve the colors used for this item in different states. If null, a default Material colors for each specific item will be used.
interactionSource an optional hoisted MutableInteractionSource for observing and emitting Interactions for this item. You can use this to change the item's appearance or preview the item in different states. Note that if null is provided, interactions will still happen internally.