MenuButton

fun MenuScope.MenuButton(modifier: Modifier = Modifier, mutableInteractionSource: MutableInteractionSource = remember { MutableInteractionSource() }, indication: Indication = LocalIndication.current, enabled: Boolean = true, shape: Shape = RectangleShape, backgroundColor: Color = Color.Unspecified, contentColor: Color = LocalContentColor.current, contentPadding: PaddingValues = NoPadding, borderColor: Color = Color.Unspecified, borderWidth: Dp = 0.dp, horizontalArrangement: Arrangement.Horizontal = Arrangement.Center, verticalAlignment: Alignment.Vertical = Alignment.CenterVertically, contents: @Composable () -> Unit)

A button component that triggers the menu's expanded state when clicked.

Parameters

modifier

Modifier to be applied to the button.

mutableInteractionSource

The interaction source for the button.

indication

The indication to be shown when the button is interacted with.

enabled

Whether the button is enabled.

shape

The shape of the button.

backgroundColor

The background color of the button.

contentColor

The color to apply to the contents of the button.

contentPadding

Padding values for the content.

borderColor

The color of the border.

borderWidth

The width of the border.

horizontalArrangement

The horizontal arrangement of the button's children.

verticalAlignment

The vertical alignment of the button's children.

contents

A composable function that defines the content of the button.