androidx.compose.material3

NavigationItemColorsSince 1.9

Class

No hand-written docs yet.

Represents the colors of the various elements of a navigation item.

class NavigationItemColors(
    selectedIconColor: Color,
    selectedTextColor: Color,
    selectedIndicatorColor: Color,
    unselectedIconColor: Color,
    unselectedTextColor: Color,
    disabledIconColor: Color,
    disabledTextColor: Color,
)

How to get one

Create it

Ready-made values and functions that return it

Used by

Parameters that take a NavigationItemColors.

Properties

selectedIconColor

val selectedIconColor: Color

selectedTextColor

val selectedTextColor: Color

selectedIndicatorColor

val selectedIndicatorColor: Color

unselectedIconColor

val unselectedIconColor: Color

unselectedTextColor

val unselectedTextColor: Color

disabledIconColor

val disabledIconColor: Color

disabledTextColor

val disabledTextColor: Color

Functions

copy

fun copy(
    selectedIconColor: Color = this.selectedIconColor,
    selectedTextColor: Color = this.selectedTextColor,
    selectedIndicatorColor: Color = this.selectedIndicatorColor,
    unselectedIconColor: Color = this.unselectedIconColor,
    unselectedTextColor: Color = this.unselectedTextColor,
    disabledIconColor: Color = this.disabledIconColor,
    disabledTextColor: Color = this.disabledTextColor,
): NavigationItemColors

Returns a copy of this NavigationItemColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”.

iconColor

fun iconColor(selected: Boolean, enabled: Boolean): Color

Represents the icon color for this item, depending on whether it is selected.

textColor

fun textColor(selected: Boolean, enabled: Boolean): Color

Represents the text color for this item, depending on whether it is selected.

Library docs

Represents the colors of the various elements of a navigation item.