StylishExposedDropdownMenu

fun ExposedDropdownMenuBoxScope.StylishExposedDropdownMenu(expanded: Boolean, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, scrollState: ScrollState = rememberScrollState(), matchAnchorWidth: 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)

The menu of a StylishExposedDropdownMenuBox, wrapping the Material 3 ExposedDropdownMenuDefaults.ExposedDropdownMenu.

Must be called inside the content of StylishExposedDropdownMenuBox so the box can constrain the menu's width to the anchor and its height to the visible window. Populate it with StylishDropdownMenuItem (or any other content) and control expanded / onDismissRequest like a regular dropdown menu.

Parameters

expanded

Whether the menu is currently shown.

onDismissRequest

Called when the user requests dismissal, such as by tapping outside the menu bounds.

modifier

Modifier applied to the menu content.

scrollState

A ScrollState used by the menu's content for vertical scrolling. Defaults to a remembered scroll state.

matchAnchorWidth

Whether the menu's width should be constrained to match the anchor's width. Defaults to true.

shape

Shape of the menu surface. Defaults to MenuDefaults.shape.

containerColor

Background color of the menu. Defaults to MenuDefaults.containerColor.

tonalElevation

Tonal elevation of the menu surface. Defaults to MenuDefaults.TonalElevation.

shadowElevation

Shadow elevation below the menu. Defaults to MenuDefaults.ShadowElevation.

border

Border drawn around the menu container. Defaults to null (no border).

content

The menu content, typically one or more StylishDropdownMenuItems, laid out in a ColumnScope.

See also