Start native apps faster with the Composables CLI ->
Object

NavigationDrawerItemDefaults

Defaults used in NavigationDrawerItem.

Source set: Common
public object NavigationDrawerItemDefaults

Defaults used in NavigationDrawerItem.

Properties

ItemPadding

Source set: Common
public val ItemPadding: PaddingValues = PaddingValues(horizontal = 12.dp)

Default external padding for a NavigationDrawerItem according to the Material specification.

Functions

colors

Source set: Common
@Composable
    public fun colors(
        selectedContainerColor: Color = NavigationDrawerTokens.ActiveIndicatorColor.value,
        unselectedContainerColor: Color = Color.Transparent,
        selectedIconColor: Color = NavigationDrawerTokens.ActiveIconColor.value,
        unselectedIconColor: Color = NavigationDrawerTokens.InactiveIconColor.value,
        selectedTextColor: Color = NavigationDrawerTokens.ActiveLabelTextColor.value,
        unselectedTextColor: Color = NavigationDrawerTokens.InactiveLabelTextColor.value,
        selectedBadgeColor: Color = selectedTextColor,
        unselectedBadgeColor: Color = unselectedTextColor,
    ): NavigationDrawerItemColors

Creates a NavigationDrawerItemColors with the provided colors according to the Material specification.

Parameters

selectedContainerColor the color to use for the background of the item when selected
unselectedContainerColor the color to use for the background of the item when unselected
selectedIconColor the color to use for the icon when the item is selected.
unselectedIconColor the color to use for the icon when the item is unselected.
selectedTextColor the color to use for the text label when the item is selected.
unselectedTextColor the color to use for the text label when the item is unselected.
selectedBadgeColor the color to use for the badge when the item is selected.
unselectedBadgeColor the color to use for the badge when the item is unselected.

Return

the resulting NavigationDrawerItemColors used for NavigationDrawerItem