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
PaddingValues
@Composable
indicatorPadding(
    railExpanded: Boolean,
    collapsedPadding: PaddingValues,
    expandedPadding: PaddingValues
)

The default indicator padding of a WideNavigationRailItem.

Cmn

Public properties

PaddingValues

The default padding to be applied when the associated WideNavigationRailItem is collapsed.

Cmn
PaddingValues

The default padding to be applied when the associated WideNavigationRailItem is 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.

indicatorPadding

@Composable
fun indicatorPadding(
    railExpanded: Boolean,
    collapsedPadding: PaddingValues = IndicatorCollapsedPadding,
    expandedPadding: PaddingValues = IndicatorExpandedPadding
): PaddingValues

The default indicator padding of a WideNavigationRailItem.

Parameters
railExpanded: Boolean

whether the associated WideNavigationRail is expanded or collapsed

collapsedPadding: PaddingValues = IndicatorCollapsedPadding

the padding to be applied when the associated WideNavigationRail is collapsed

expandedPadding: PaddingValues = IndicatorExpandedPadding

the padding to be applied when the associated WideNavigationRail is expanded

Public properties

IndicatorCollapsedPadding

val IndicatorCollapsedPaddingPaddingValues

The default padding to be applied when the associated WideNavigationRailItem is collapsed.

IndicatorExpandedPadding

val IndicatorExpandedPaddingPaddingValues

The default padding to be applied when the associated WideNavigationRailItem is expanded.