← Back to Material Compose
DropdownMenuItem
Component
in
Material
. Since 0.1.0-dev15Overview
Code Examples
<a href="https://material.io/components/menus#dropdown-menu" class="external" target="_blank">Material Design dropdown menu</a> item.
Overloads
DropdownMenuItem
@Composable
fun DropdownMenuItem(
onClick: () -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
contentPadding: PaddingValues = MenuDefaults.DropdownMenuItemContentPadding,
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
content: @Composable RowScope.() -> Unit
)
Parameters
Name | Description |
---|---|
onClick | Called when the menu item was clicked |
modifier | The modifier to be applied to the menu item |
enabled | Controls the enabled state of the menu item - when false , the menu item will not be clickable and onClick will not be invoked |
contentPadding | the padding applied to the content of this menu item |
interactionSource | the MutableInteractionSource representing the stream of Interactions for this DropdownMenuItem. You can create and pass in your own remembered MutableInteractionSource if you want to observe Interactions and customize the appearance / behavior of this DropdownMenuItem in different Interactions |