Menu Item
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
on Click
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.
interaction Source
The interaction source for the menu item.
indication
The indication to be shown when the menu item is interacted with.
content Padding
Padding values for the content.
shape
The shape of the menu item.
horizontal Arrangement
The horizontal arrangement of the menu item's children.
vertical Alignment
The vertical alignment of the menu item's children.
contents
A composable function that defines the content of the menu item.