Popup
@Composable
expect fun Popup(
alignment: Alignment = Alignment.TopStart,
offset: IntOffset = IntOffset(0, 0),
onDismissRequest: (() -> Unit)? = null,
properties: PopupProperties = PopupProperties(),
content: @Composable () -> Unit,
)
Opens a popup with the given content.
A popup is a floating container that appears on top of the current activity. It is especially useful for non-modal UI surfaces that remain hidden until they are needed, for example floating menus like Cut/Copy/Paste.
The popup is positioned relative to its parent, using the alignment and offset. The popup is visible as long as it is part of the composition hierarchy.
Parameters
| alignment | The alignment relative to the parent. |
| offset | An offset from the original aligned position of the popup. Offset respects the Ltr/Rtl context, thus in Ltr it will be added to the original aligned position and in Rtl it will be subtracted from it. |
| onDismissRequest | Executes when the user clicks outside of the popup. |
| properties | PopupProperties for further customization of this popup's behavior. |
| content | The content to be displayed inside the popup. |
Popup
@Composable
expect fun Popup(
popupPositionProvider: PopupPositionProvider,
onDismissRequest: (() -> Unit)? = null,
properties: PopupProperties = PopupProperties(),
content: @Composable () -> Unit,
)
Opens a popup with the given content.
The popup is positioned using a custom popupPositionProvider.
Parameters
| popupPositionProvider | Provides the screen position of the popup. |
| onDismissRequest | Executes when the user clicks outside of the popup. |
| properties | PopupProperties for further customization of this popup's behavior. |
| content | The content to be displayed inside the popup. |
Popup
@Composable
actual fun Popup(
alignment: Alignment,
offset: IntOffset,
onDismissRequest: (() -> Unit)?,
properties: PopupProperties,
content: @Composable () -> Unit,
)
Opens a popup with the given content.
A popup is a floating container that appears on top of the current activity. It is especially useful for non-modal UI surfaces that remain hidden until they are needed, for example floating menus like Cut/Copy/Paste.
The popup is positioned relative to its parent, using the alignment and offset. The popup is visible as long as it is part of the composition hierarchy.
Parameters
| alignment | The alignment relative to the parent. |
| offset | An offset from the original aligned position of the popup. Offset respects the Ltr/Rtl context, thus in Ltr it will be added to the original aligned position and in Rtl it will be subtracted from it. |
| onDismissRequest | Executes when the user clicks outside of the popup. |
| properties | PopupProperties for further customization of this popup's behavior. |
| content | The content to be displayed inside the popup. |
Popup
@Composable
actual fun Popup(
popupPositionProvider: PopupPositionProvider,
onDismissRequest: (() -> Unit)?,
properties: PopupProperties,
content: @Composable () -> Unit,
)
Opens a popup with the given content.
The popup is positioned using a custom popupPositionProvider.
Parameters
| popupPositionProvider | Provides the screen position of the popup. |
| onDismissRequest | Executes when the user clicks outside of the popup. |
| properties | PopupProperties for further customization of this popup's behavior. |
| content | The content to be displayed inside the popup. |