ExposedDropdownMenu
Source set: Common
@Composable
public fun ExposedDropdownMenuBoxScope.ExposedDropdownMenu(
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,
)
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 |
| matchAnchorWidth | 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 |