Common
object NavigationDrawerItemDefaults
Defaults used in NavigationDrawerItem.
Properties
Common
val ItemPadding = PaddingValues(horizontal = 12.dp)
Default external padding for a NavigationDrawerItem according to the Material specification.
Functions
colors
@Composable
fun colors(
selectedContainerColor: Color = NavigationDrawerTokens.ActiveIndicatorColor.value,
unselectedContainerColor: Color = Color.Transparent,
selectedIconColor: Color = NavigationDrawerTokens.ActiveIconColor.value,
unselectedIconColor: Color = NavigationDrawerTokens.InactiveIconColor.value,
selectedTextColor: Color = NavigationDrawerTokens.ActiveLabelTextColor.value,
unselectedTextColor: Color = NavigationDrawerTokens.InactiveLabelTextColor.value,
selectedBadgeColor: Color = selectedTextColor,
unselectedBadgeColor: Color = unselectedTextColor,
): NavigationDrawerItemColors
Creates a NavigationDrawerItemColors with the provided colors according to the Material specification.
Parameters
| selectedContainerColor | the color to use for the background of the item when selected |
| unselectedContainerColor | the color to use for the background of the item when unselected |
| selectedIconColor | the color to use for the icon when the item is selected. |
| unselectedIconColor | the color to use for the icon when the item is unselected. |
| selectedTextColor | the color to use for the text label when the item is selected. |
| unselectedTextColor | the color to use for the text label when the item is unselected. |
| selectedBadgeColor | the color to use for the badge when the item is selected. |
| unselectedBadgeColor | the color to use for the badge when the item is unselected. |
Returns
| the resulting NavigationDrawerItemColors used for NavigationDrawerItem |