Popover
A floating panel for contextual UI at its trigger, with flexible sizing and a controllable open state.
import { Popover, usePopoverController } from "@plexui/react-native"Examples
Overview
Using the controller
Confirmation
Column configuration
Nesting
A popover opened from inside another stands over it, and Android's back and the web's Escape close the topmost one first.
Platforms
| iOS 26 | Android | |
|---|---|---|
| Native component | None (UIPopoverPresentationController is UIKit only: a Plex view drawn as its compact panel) | None (a Plex view drawn as a popup) |
| Look | A glass panel with 34pt corners at its trigger | A popup surface with 12dp corners and a level 2 shadow at its trigger |
API
Popover (root)
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | — | Controlled open state; uncontrolled when omitted |
onOpenChange | (nextState: boolean) => void | — | Called when the popover opens or closes |
Popover.Trigger: Renders the element that toggles the popover; the panel stands at it and follows it when it moves. Its only child is an element that hands its native view to ref.
Popover.Content
| Prop | Type | Default | Description |
|---|---|---|---|
width | number | "auto" | "auto" | Panel width |
minWidth | number | "auto" | 300 | Minimum panel width |
maxWidth | number | 700 | Maximum panel width, capped by the room inside the window |
side | "top" | "right" | "bottom" | "left" | "bottom" | Preferred placement; turns when it does not fit |
align | "start" | "center" | "end" | "center" | Alignment relative to trigger |
sideOffset | number | 8 | Offset from trigger; negative to lay the panel over it |
alignOffset | number | -5 | Offset from the start or end alignment |
avoidCollisions | boolean | true | Turn and move to stay inside the window |
collisionPadding | number | { top?, right?, bottom?, left? } | 20 | Space to keep from the window's edges (the safe area at least); a side an object leaves out gets 0 |
translucent | boolean | false | Translucent, blurred surface (iOS and the web) |
autoFocus | boolean | true | Move focus to the panel when it opens (the web) |
aria-labelledby | string | — | The id of the element that names the popover (the web) |
aria-label | string | — | Accessible name of the popover |
style | StyleProp<ViewStyle> | — | Style of the panel (padding, a fixed height) |
testID | string | — | Test id |
usePopoverController(): Hook available inside Popover.Content. Returns { close: () => void, shake: () => void }.
The web's showOnHover and hoverOpenDelay are for a pointer's hover, Popover.Anchor takes a DOM element and zIndex orders the page's layers: React Native has none of them (an overlay stands over the app). style stands for className.