Object

ShortNavigationBarItemDefaults

Defaults used in ShortNavigationBarItem.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
object ShortNavigationBarItemDefaults

Defaults used in ShortNavigationBarItem.

Functions

@Composable fun colors() = MaterialTheme.colorScheme.defaultShortNavigationBarItemColors

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

colors

@Composable
    fun colors(
        selectedIconColor: Color = NavigationBarTokens.ItemActiveIconColor.value,
        selectedTextColor: Color = NavigationBarTokens.ItemActiveLabelTextColor.value,
        selectedIndicatorColor: Color = NavigationBarTokens.ItemActiveIndicatorColor.value,
        unselectedIconColor: Color = NavigationBarTokens.ItemInactiveIconColor.value,
        unselectedTextColor: Color = NavigationBarTokens.ItemInactiveLabelTextColor.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.
selectedTextColor the color to use for the text label when the item is selected.
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.

Returns

the resulting NavigationItemColors used for ShortNavigationBarItem