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

ParameterTypeDefaultDescription
openBooleanControls whether the popover panel is visible.
modifierModifierModifierModifier applied to the inner content Column inside the floating panel.
onDismissRequest(() -> Unit)?nullCalled when the user taps outside the popover. Use this to set open = false.
trigger@Composable () -> UnitThe composable that anchors the popover. The panel appears just below this content.
content@Composable () -> UnitThe 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 ProvideTextStyle with the theme's popoverForeground color and 14 sp font size, so plain Text calls 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.
  • open is fully controlled — you own the state. Toggle it in trigger's onClick and reset it in onDismissRequest.
Edit this page on GitHub