Popover
A floating panel for contextual UI, with flexible sizing, hover triggers, a controllable open state and nesting.
import { Popover } from "@plexui/ui/components/Popover";Examples
Overview
These examples keep the panel beside the trigger on desktop and below it on phones, where space beside the trigger is limited.
Sizing the popover
Open on hover
Using the controller
Confirmation
Column configuration
Nesting
All floating UI components in Plex UI can be infinitely nested by relying on z-index: auto; and natural stacking order.
Additionally, esc keypresses are handled independently as a stacking order.
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 |
showOnHover | boolean | false | Open on hover and focus instead of click |
hoverOpenDelay | number | 150 | Delay before a hover popover opens (ms) |
Popover.Trigger: Renders the element that toggles the popover. The trigger should be the user's point of interaction for revealing the popup. No specific props.
Popover.Content
| Prop | Type | Default | Description |
|---|---|---|---|
width | number | "auto" | "auto" | Panel width in px |
minWidth | number | "auto" | 300 | Minimum panel width in px |
maxWidth | number | 700 | Maximum panel width in px, capped by the space available in the viewport |
side | "top" | "right" | "bottom" | "left" | "bottom" | Preferred placement; flips when it collides |
align | "start" | "center" | "end" | "center" | Alignment relative to trigger |
sideOffset | number | 8 | Offset from trigger (px) |
alignOffset | number | -5 | Offset from the start or end alignment (px) |
avoidCollisions | boolean | true | Reposition to stay inside the viewport and scroll containers |
collisionPadding | number | 20 | Space in px to keep from viewport and scroll container boundaries |
translucent | boolean | false | Translucent, blurred surface |
autoFocus | boolean | true | Move focus into the panel when it opens (hover popovers never take focus) |
data-* | string | — | Data attributes land on the panel |
className | string | — | Applied to the panel |
usePopoverController(): Hook available inside Popover.Content. Returns { close: () => void, shake: () => void }.
Styling
Popover reads these component tokens. Override them at any scope to restyle it:
--popover-radius: radius (defaultvar(--radius-xl),34pxat 767px and below, the corner of an iOS 26 action sheet)--popover-mobile-background: panel surface at 767px and below (defaultlight-dark(var(--color-surface-elevated), var(--alpha-12)): the elevated surface in light, the menus' glass in dark)--popover-mobile-backdrop-filter: blur behind the panel at 767px and below in the dark theme (default--menu-mobile-backdrop-filter,blur(18px))
A translucent panel keeps its own surface on phones.