ZBMui

Popover

View markdown

An accessible popup anchored to a button.

Installation

components/ui/popover.tsx

Usage

Examples

Align

Change the alignment by setting the positionerProps align property to start, center, or end.

Side

Change the side by setting the positionerProps side property to top, right, bottom, left, inline-start or inline-end.

With close button

With arrow

To add an arrow pointing to the trigger, set showArrow to true on the PopoverPopup.

Tooltip style

Pass tooltipStyle to the PopoverPopup to make the popover look like a tooltip. Pass openOnHover to the PopoverTrigger to open the popover on hover instead of click.

Animated

You can create animated popovers that smoothly transition between different triggers using detached triggers. This pattern allows multiple triggers to share a single popover popup, with automatic animations for position, size, and content changes.

To create detached triggers:

  1. Create a handle using popoverCreateHandle
  2. Attach the same handle to multiple PopoverTrigger components
  3. Each trigger provides a payload prop containing the content component
  4. Use a single Popover component with the handle to render the popup
ZBMui

Built by the ZBM.

© 2026 ZBM ui. All rights reserved.