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 26Android
Native componentNone (UIPopoverPresentationController is UIKit only: a Plex view drawn as its compact panel)None (a Plex view drawn as a popup)
LookA glass panel with 34pt corners at its triggerA popup surface with 12dp corners and a level 2 shadow at its trigger

API

Popover (root)

PropTypeDefaultDescription
openboolean—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

PropTypeDefaultDescription
widthnumber | "auto""auto"Panel width
minWidthnumber | "auto"300Minimum panel width
maxWidthnumber700Maximum 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
sideOffsetnumber8Offset from trigger; negative to lay the panel over it
alignOffsetnumber-5Offset from the start or end alignment
avoidCollisionsbooleantrueTurn and move to stay inside the window
collisionPaddingnumber | { top?, right?, bottom?, left? }20Space to keep from the window's edges (the safe area at least); a side an object leaves out gets 0
translucentbooleanfalseTranslucent, blurred surface (iOS and the web)
autoFocusbooleantrueMove focus to the panel when it opens (the web)
aria-labelledbystring—The id of the element that names the popover (the web)
aria-labelstring—Accessible name of the popover
styleStyleProp<ViewStyle>—Style of the panel (padding, a fixed height)
testIDstring—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.