ExposedDropdownMenu

@Composable
fun ExposedDropdownMenu(expanded: Boolean, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, scrollState: ScrollState = rememberScrollState(), matchTextFieldWidth: Boolean = true, shape: Shape = MenuDefaults.shape, containerColor: Color = MenuDefaults.containerColor, tonalElevation: Dp = MenuDefaults.TonalElevation, shadowElevation: Dp = MenuDefaults.ShadowElevation, border: BorderStroke? = null, content: @Composable ColumnScope.() -> Unit)

Popup which contains content for Exposed Dropdown Menu. Should be used inside the content of ExposedDropdownMenuBox.

Parameters

expanded

whether the menu is expanded

onDismissRequest

called when the user requests to dismiss the menu, such as by tapping outside the menu's bounds

modifier

the Modifier to be applied to this menu

scrollState

a ScrollState used by the menu's content for items vertical scrolling

matchTextFieldWidth

whether the menu's width should be forcefully constrained to match the width of the text field to which it's attached.

shape

the shape of the menu

containerColor

the container color of the menu

tonalElevation

when containerColor is ColorScheme.surface, a translucent primary color overlay is applied on top of the container. A higher tonal elevation value will result in a darker color in light theme and lighter color in dark theme. See also: Surface.

shadowElevation

the elevation for the shadow below the menu

border

the border to draw around the container of the menu. Pass null for no border.

content

the content of the menu


@Composable
fun ExposedDropdownMenu(expanded: Boolean, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, scrollState: ScrollState = rememberScrollState(), focusable: Boolean = true, matchTextFieldWidth: Boolean = true, shape: Shape = MenuDefaults.shape, containerColor: Color = MenuDefaults.containerColor, tonalElevation: Dp = MenuDefaults.TonalElevation, shadowElevation: Dp = MenuDefaults.ShadowElevation, border: BorderStroke? = null, content: @Composable ColumnScope.() -> Unit)

Deprecated

The `focusable` parameter is unused. Pass the proper MenuAnchorType to Modifier.menuAnchor instead, which will handle focusability automatically.