Composable Component

DropdownMenuPopup

A Popup that provides the foundation for building a custom menu.

DropdownMenuPopup social preview

A Popup that provides the foundation for building a custom menu.

Common
@ExperimentalMaterial3ExpressiveApi
@Composable
expect fun DropdownMenuPopup(
    expanded: Boolean,
    onDismissRequest: () -> Unit,
    modifier: Modifier = Modifier,
    offset: DpOffset = DpOffset(0.dp, 0.dp),
    properties: PopupProperties = DefaultMenuProperties,
    content: @Composable ColumnScope.() -> Unit,
)

Parameters

expanded whether the menu is expanded or not.
onDismissRequest called when the user requests to dismiss the menu, such as by tapping outside the menu's bounds.
modifier Modifier to be applied to the menu's content.
offset DpOffset from the original position of the menu.
properties PopupProperties for further customization of this popup's behavior.
content the content of this dropdown menu.

Android
@ExperimentalMaterial3ExpressiveApi
@Composable
actual fun DropdownMenuPopup(
    expanded: Boolean,
    onDismissRequest: () -> Unit,
    modifier: Modifier,
    offset: DpOffset,
    properties: PopupProperties,
    content: @Composable ColumnScope.() -> Unit,
)