Popover
Displays rich content in a floating panel, triggered by a button.
Basic Usage
Popover renders its content in a floating panel positioned just below the trigger. Pass open to control visibility and onDismissRequest to close the popover when the user taps outside.
API Reference
Popover
| Parameter | Type | Default | Description |
|---|---|---|---|
open | Boolean | — | Controls whether the popover panel is visible. |
modifier | Modifier | Modifier | Modifier applied to the inner content Column inside the floating panel. |
onDismissRequest | (() -> Unit)? | null | Called when the user taps outside the popover. Use this to set open = false. |
trigger | @Composable () -> Unit | — | The composable that anchors the popover. The panel appears just below this content. |
content | @Composable () -> Unit | — | The content rendered inside the floating panel. |
Behaviour notes
- The panel is positioned below the trigger with a fixed 12 dp gap, horizontally centered relative to it.
- Content is automatically wrapped in
ProvideTextStylewith the theme'spopoverForegroundcolor and 14 sp font size, so plainTextcalls match the popover style without extra styling. - The popover uses Jetpack Compose's
Popup, so it renders outside the normal layout hierarchy and is not clipped by parent containers. openis fully controlled — you own the state. Toggle it intrigger'sonClickand reset it inonDismissRequest.