MenuItem

fun MenuScope.MenuItem(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, indication: Indication = LocalIndication.current, contentPadding: PaddingValues = NoPadding, shape: Shape = RectangleShape, horizontalArrangement: Arrangement.Horizontal = Arrangement.Start, verticalAlignment: Alignment.Vertical = Alignment.CenterVertically, contents: @Composable RowScope.() -> Unit)

A menu item that can be clicked to perform an action and dismiss the menu.

Parameters

onClick

The callback to be invoked when the menu item is clicked.

modifier

Modifier to be applied to the menu item.

enabled

Whether the menu item is enabled.

interactionSource

The interaction source for the menu item.

indication

The indication to be shown when the menu item is interacted with.

contentPadding

Padding values for the content.

shape

The shape of the menu item.

horizontalArrangement

The horizontal arrangement of the menu item's children.

verticalAlignment

The vertical alignment of the menu item's children.

contents

A composable function that defines the content of the menu item.