ui

Popover

An accessible popup anchored to a button. Built with Base UI and Tailwind CSS. Copy-paste ready.

API Reference

Installation

Usage

Examples

With Close Button

Tooltip Style

Use the tooltipStyle prop to make a popover look like a tooltip. This is recommended when you have an info icon button whose only purpose is to show additional information. See the tooltip accessibility guidelines for best practices.

Animated Popovers

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

Shared Popover with Multiple Triggers

Use a single Popover with a shared handle to let multiple buttons open the same popup with different content. Ideal for toolbar actions like notifications and profile where the popup position and content swap seamlessly.

Placement

Use the side prop on PopoverContent to control which side of the trigger the popover appears on. Combine with align to fine-tune positioning for any layout.

User Profile Card

Trigger a rich profile card from an inline mention or avatar button. A common pattern in collaboration tools — shows the user's name, handle, bio, and follower stats with a follow action.

Timestamp Detail

Display a relative time label (e.g. "2 hours ago") as a trigger and reveal exact UTC and local timestamps in the popover. Useful in audit logs, activity feeds, and deployment dashboards.

Quick Settings

Surface frequently adjusted preferences — dark mode, notifications, and volume — directly in a compact popover. Reduces trips to a full settings page for common toggles.

Feature Tour

Walk users through onboarding steps with a multi-step popover. Step counter and prev/next navigation let users move at their own pace without leaving the current page.

A share popover with a one-click copy link row and contextual share-via options. The copy button transitions to a check icon on success, providing clear feedback without a toast.

Accent Color Picker

Let users choose a theme accent from a grid of color swatches. The selected color is highlighted with a checkmark and reflected in the trigger button for instant visual feedback.

Keyboard Shortcuts

Surface a grouped shortcut reference inline without navigating away. Pairs well with a ? or keyboard icon trigger and keeps the reference close to where users need it.

Filter Panel

A structured filter popover with grouped checkbox options and a live badge count on the trigger. Clear all and Apply actions give users explicit control over when filters take effect.

Set a Reminder

Quick-pick reminder intervals presented as a scannable list with a secondary option to choose a custom date and time. The selected slot is visually confirmed with a dot indicator.

System Status

Display real-time service health for each backend service with latency figures and status labels. The trigger dot pulses amber when any service is degraded, giving users an at-a-glance indicator.

Emoji Picker

A 5-column emoji grid in a compact popover — clicking an emoji selects it and renders a reaction badge below the trigger.

Confirmation

Replaces a full Dialog for low-stakes destructive actions: a "Delete item?" prompt with Cancel and Delete buttons inside the popover itself.

Tag Editor

An inline tag editor with Badge chips, a × remove button per tag, a text input for new entries, and suggested tags — all inside a popover anchored to a + icon button.

Notification Panel

A bell icon trigger with an unread count badge opens a list of notifications. Clicking an item marks it read; "Mark all read" clears the badge count at once.

Inline Text Edit

A pencil icon button anchored next to a display value opens a popover with an Input pre-filled with the current value and Save / Cancel actions — a common inline edit pattern.