WideNavigationRailItemDefaults


Defaults used in WideNavigationRailItem.

Summary

Public functions

NavigationItemColors

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

Cmn
NavigationItemColors
@Composable
colors(
    selectedIconColor: Color,
    selectedTextColor: Color,
    selectedIndicatorColor: Color,
    unselectedIconColor: Color,
    unselectedTextColor: Color,
    disabledIconColor: Color,
    disabledTextColor: Color
)

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

Cmn
NavigationItemIconPosition
iconPositionFor(railExpanded: Boolean)

The default icon position of a WideNavigationRailItem given whether the associated WideNavigationRail is collapsed or expanded.

Cmn

Public functions

colors

@Composable
fun colors(): NavigationItemColors

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

colors

@Composable
fun colors(
    selectedIconColor: Color = NavigationRailColorTokens.ItemActiveIcon.value,
    selectedTextColor: Color = NavigationRailColorTokens.ItemActiveLabelText.value,
    selectedIndicatorColor: 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)
): NavigationItemColors

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

Parameters
selectedIconColor: Color = NavigationRailColorTokens.ItemActiveIcon.value

the color to use for the icon when the item is selected.

selectedTextColor: Color = NavigationRailColorTokens.ItemActiveLabelText.value

the color to use for the text label when the item is selected.

selectedIndicatorColor: Color = NavigationRailColorTokens.ItemActiveIndicator.value

the color to use for the indicator when the item is selected.

unselectedIconColor: Color = NavigationRailColorTokens.ItemInactiveIcon.value

the color to use for the icon when the item is unselected.

unselectedTextColor: Color = NavigationRailColorTokens.ItemInactiveLabelText.value

the color to use for the text label when the item is unselected.

disabledIconColor: Color = unselectedIconColor.copy(alpha = DisabledAlpha)

the color to use for the icon when the item is disabled.

disabledTextColor: Color = unselectedTextColor.copy(alpha = DisabledAlpha)

the color to use for the text label when the item is disabled.

iconPositionFor

fun iconPositionFor(railExpanded: Boolean): NavigationItemIconPosition

The default icon position of a WideNavigationRailItem given whether the associated WideNavigationRail is collapsed or expanded.