Functions
Link copied to clipboard
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.
Link copied to clipboard
fun MenuScope.MenuContent(modifier: Modifier = Modifier, enter: EnterTransition = AppearInstantly, exit: ExitTransition = DisappearInstantly, alignment: Alignment.Horizontal = Alignment.Start, contents: @Composable () -> Unit)
The content container for the menu items. This composable handles the positioning and animation of the menu content when it is expanded.
Link copied to clipboard
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.