Start native apps faster with the Composables CLI ->
Object

WideNavigationRailItemDefaults

Defaults used in WideNavigationRailItem.

Source set: Common
public object WideNavigationRailItemDefaults

Defaults used in WideNavigationRailItem.

Properties

IndicatorCollapsedPadding

Source set: Common
public val IndicatorCollapsedPadding: PaddingValues =
        PaddingValues(
            horizontal = ItemTopIconIndicatorHorizontalPadding,
            vertical = ItemTopIconIndicatorVerticalPadding,
        )

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

IndicatorExpandedPadding

Source set: Common
public val IndicatorExpandedPadding: PaddingValues =
        PaddingValues(
            horizontal = NavigationRailHorizontalItemTokens.FullWidthLeadingSpace,
            vertical = ItemStartIconIndicatorVerticalPadding,
        )

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

Functions

indicatorPadding

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

The default indicator padding of a WideNavigationRailItem.

Parameters

collapsedPadding the padding to be applied when the associated WideNavigationRail is collapsed
expandedPadding the padding to be applied when the associated WideNavigationRail is expanded
railExpanded whether the associated WideNavigationRail is expanded or collapsed

iconPositionFor

Source set: Common
public fun iconPositionFor(railExpanded: Boolean): NavigationItemIconPosition

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

colors

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

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

colors

Source set: Common
@Composable
    public fun colors(
        selectedIconColor: Color = NavigationRailColorTokens.ItemActiveIcon.value,
        selectedTextColorTopIconPosition: Color =
            NavigationRailColorTokens.ItemActiveLabelText.value,
        // TODO: Replace with the correct token once it is available in NavigationRailColorTokens
        selectedTextColorStartIconPosition: Color = NavigationRailColorTokens.ItemActiveIcon.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 the color to use for the icon when the item is selected.
selectedTextColorTopIconPosition the color to use for the text label when the item is selected and the icon is at the top.
selectedTextColorStartIconPosition the color to use for the text label when the item is selected and the icon is at the start.
selectedIndicatorColor 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 NavigationItemColors used for WideNavigationRailItem

colors

Source set: Common
@Deprecated("Maintained for binary compatibility", level = DeprecationLevel.HIDDEN)
    @Composable
    public 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