MenuDefaults


Contains default values used for DropdownMenu and DropdownMenuItem.

Summary

Public functions

MenuItemColors

Creates a MenuItemColors that represents the default text and icon colors used in a DropdownMenuItemContent.

Cmn
MenuItemColors
@Composable
itemColors(
    textColor: Color,
    leadingIconColor: Color,
    trailingIconColor: Color,
    disabledTextColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingIconColor: Color
)

Creates a MenuItemColors that represents the default text and icon colors used in a DropdownMenuItemContent.

Cmn

Public properties

PaddingValues

Default padding used for DropdownMenuItem.

Cmn
Dp

The default shadow elevation for a menu.

Cmn
Dp

The default tonal elevation for a menu.

Cmn
Color

The default container color for a menu.

Cmn
Shape

The default shape for a menu.

Cmn

Public functions

itemColors

@Composable
fun itemColors(): MenuItemColors

Creates a MenuItemColors that represents the default text and icon colors used in a DropdownMenuItemContent.

itemColors

@Composable
fun itemColors(
    textColor: Color = Color.Unspecified,
    leadingIconColor: Color = Color.Unspecified,
    trailingIconColor: Color = Color.Unspecified,
    disabledTextColor: Color = Color.Unspecified,
    disabledLeadingIconColor: Color = Color.Unspecified,
    disabledTrailingIconColor: Color = Color.Unspecified
): MenuItemColors

Creates a MenuItemColors that represents the default text and icon colors used in a DropdownMenuItemContent.

Parameters
textColor: Color = Color.Unspecified

the text color of this DropdownMenuItemContent when enabled

leadingIconColor: Color = Color.Unspecified

the leading icon color of this DropdownMenuItemContent when enabled

trailingIconColor: Color = Color.Unspecified

the trailing icon color of this DropdownMenuItemContent when enabled

disabledTextColor: Color = Color.Unspecified

the text color of this DropdownMenuItemContent when not enabled

disabledLeadingIconColor: Color = Color.Unspecified

the leading icon color of this DropdownMenuItemContent when not enabled

disabledTrailingIconColor: Color = Color.Unspecified

the trailing icon color of this DropdownMenuItemContent when not enabled

Public properties

val DropdownMenuItemContentPaddingPaddingValues

Default padding used for DropdownMenuItem.

ShadowElevation

val ShadowElevationDp

The default shadow elevation for a menu.

TonalElevation

val TonalElevationDp

The default tonal elevation for a menu.

containerColor

val containerColorColor

The default container color for a menu.

shape

val shapeShape

The default shape for a menu.