Skip to main content
Urbicon UI
source

Popover

Floating content panel anchored to a trigger with precise positioning, portal rendering, and size syncing.

Choose an option…
4
Loading...
Loading syntax highlighting...

01 When to use

Popover is a floating panel anchored to a trigger element. Use it for contextual surfaces — action menus, date pickers, inline help — that should appear next to the element the user just interacted with. Built on Floating UI for placement, with native popover="auto" for the open/close lifecycle. Not modal.

Pick a different overlay if you need:

  • A modal sheet that opens from the edge of the viewport (focus trap, backdrop) → Drawer.
  • A hover-only description tied to aria-describedbyTooltip.
  • A list of selectable actions or items with full keyboard semantics → Menu.
  • A centered, blocking modal (confirmation, short form) → Dialog.

02 Examples

Sizes

Loading...
Loading syntax highlighting...

Placements

The popover auto-flips when the preferred side runs out of space.
Loading...
Loading syntax highlighting...

Rich Content – User Profile

Loading...
Loading syntax highlighting...

Sync Width

Match the popover width to its trigger – ideal for select or autocomplete patterns.
Loading...
Loading syntax highlighting...

Controlled State

Bind the open state to react to or drive popover visibility from outside.
Loading...
Loading syntax highlighting...

03 Customization

Gradient Action Panel

Override the panel surface with slotClasses for a branded popover.
Loading...
Loading syntax highlighting...

Glass Morphism (unstyled)

Strip all defaults and rebuild with a translucent glass aesthetic.
Loading...
Loading syntax highlighting...

04 Accessibility

ARIA Attributes

The trigger wrapper sets aria-haspopup="dialog" and aria-expanded reflecting the current open state. The floating panel receives role="dialog" by default. Set aria-modal when the popover contains a form or critical action.

Keyboard

Enter / Space toggle the popover when the trigger is focused. Escape closes the popover and returns focus to the trigger. Tab moves through focusable content inside the popover.

Click Outside

Clicking outside the popover or its trigger closes it automatically. Use the ignore prop to exclude specific elements from outside-click detection.

Focus Management

When aria-modal is set, focus stays within the popover until it is closed. Use for forms or critical actions where escaping focus could confuse the user. For lightweight overlays, omit it so users can freely tab away.

05 API Reference

23 props
23 props 1 required

No matching properties

No matching properties

06 Installation

Import

Loading...
Loading syntax highlighting...