← Back to Compose UI
DropdownPopup
Component
in
Compose UI
. Since 0.1.0-dev15Overview
Code Examples
Opens a popup with the given content.
The dropdown popup is positioned below its parent, using the dropDownAlignment and offset. The dropdown popup is visible as long as it is part of the composition hierarchy.
Overloads
DropdownPopup
@Composable
fun DropdownPopup(
dropDownAlignment: DropDownAlignment = DropDownAlignment.Start,
offset: IntOffset = IntOffset(0, 0),
isFocusable: Boolean = false,
onDismissRequest: (() -> Unit)? = null,
children: @Composable () -> Unit
)
Parameters
Name | Description |
---|---|
dropDownAlignment | The start or end alignment below the parent. |
offset | An offset from the original aligned position of the popup. |
isFocusable | Indicates if the popup can grab the focus. |
onDismissRequest | Executes when the popup tries to dismiss itself. This happens when the popup is focusable and the user clicks outside. |
children | The content to be displayed inside the popup |