Start native apps faster with the Composables CLI ->
Object

NavigationRailItemDefaults

Defaults used in NavigationRailItem.

Source set: Common
public object NavigationRailItemDefaults

Defaults used in NavigationRailItem.

Functions

colors

Source set: Common
@Composable
    public fun colors(): NavigationRailItemColors

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

colors

Source set: Common
@Composable
    public fun colors(
        selectedIconColor: Color = NavigationRailColorTokens.ItemActiveIcon.value,
        selectedTextColor: Color = NavigationRailColorTokens.ItemActiveLabelText.value,
        indicatorColor: Color = NavigationRailColorTokens.ItemActiveIndicator.value,
        unselectedIconColor: Color = NavigationRailColorTokens.ItemInactiveIcon.value,
        unselectedTextColor: Color = NavigationRailColorTokens.ItemInactiveLabelText.value,
        disabledIconColor: Color = unselectedIconColor.copy(alpha = DisabledAlpha),
        disabledTextColor: Color = unselectedTextColor.copy(alpha = DisabledAlpha),
    ): NavigationRailItemColors

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

Parameters

selectedIconColor the color to use for the icon when the item is selected.
selectedTextColor the color to use for the text label when the item is selected.
indicatorColor the color to use for the indicator when the item is selected.
unselectedIconColor the color to use for the icon when the item is unselected.
unselectedTextColor the color to use for the text label when the item is unselected.
disabledIconColor the color to use for the icon when the item is disabled.
disabledTextColor the color to use for the text label when the item is disabled.

Return

the resulting NavigationRailItemColors used for NavigationRailItem

colors

Source set: Common
@Deprecated(
        "Use overload with disabledIconColor and disabledTextColor",
        level = DeprecationLevel.HIDDEN,
    )
    @Composable
    public fun colors(
        selectedIconColor: Color = NavigationRailColorTokens.ItemActiveIcon.value,
        selectedTextColor: Color = NavigationRailColorTokens.ItemActiveLabelText.value,
        indicatorColor: Color = NavigationRailColorTokens.ItemActiveIndicator.value,
        unselectedIconColor: Color = NavigationRailColorTokens.ItemInactiveIcon.value,
        unselectedTextColor: Color = NavigationRailColorTokens.ItemInactiveLabelText.value,
    ): NavigationRailItemColors