The scope associated with the NavigationSuiteScope.

Summary

Public functions

Unit
item(
    selected: Boolean,
    onClick: () -> Unit,
    icon: @Composable () -> Unit,
    modifier: Modifier,
    enabled: Boolean,
    label: (@Composable () -> Unit)?,
    alwaysShowLabel: Boolean,
    badge: (@Composable () -> Unit)?,
    colors: NavigationSuiteItemColors?,
    interactionSource: MutableInteractionSource?
)

This function sets the parameters of the default Material navigation item to be used with the Navigation Suite Scaffold.

Cmn

Public functions

item

fun item(
    selected: Boolean,
    onClick: () -> Unit,
    icon: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    enabled: Boolean = true,
    label: (@Composable () -> Unit)? = null,
    alwaysShowLabel: Boolean = true,
    badge: (@Composable () -> Unit)? = null,
    colors: NavigationSuiteItemColors? = null,
    interactionSource: MutableInteractionSource? = null
): Unit

This function sets the parameters of the default Material navigation item to be used with the Navigation Suite Scaffold. The item is called in NavigationSuite, according to the current NavigationSuiteType.

For specifics about each item component, see NavigationBarItem, NavigationRailItem, and NavigationDrawerItem.

Parameters
selected: Boolean

whether this item is selected

onClick: () -> Unit

called when this item is clicked

icon: @Composable () -> Unit

icon for this item, typically an Icon

modifier: Modifier = Modifier

the Modifier to be applied to this item

enabled: Boolean = true

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.

label: (@Composable () -> Unit)? = null

the text label for this item

alwaysShowLabel: Boolean = true

whether to always show the label for this item. If false, the label will only be shown when this item is selected. Note: for NavigationDrawerItem this is always true

badge: (@Composable () -> Unit)? = null

optional badge to show on this item

colors: NavigationSuiteItemColors? = null

NavigationSuiteItemColors that will be used to resolve the colors used for this item in different states. If null, NavigationSuiteDefaults.itemColors will be used.

interactionSource: MutableInteractionSource? = null

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.