Vue playground

Nova v3.37.0

Preview

Vue

Popover

nv-popover

Provides contextual information or actions in a floating, dismissible container.

Live demo

Placement

Use a popover to show supplementary details or a short action next to the element that opens it.

Anatomy

A popover panel with an icon, the title Label, a short description and Cancel and Confirm actions. Callouts mark 1 the container, 2 the content and 3 the arrow at the lower-left edge.

The parts of a popover.
  1. Container positions the panel next to its trigger.
  2. Content holds text, icons or actions; place any markup in the content slot. The trigger goes in the trigger slot.
  3. Arrow (optional, hasArrow) points to the trigger.

Variants and slots

The design shows a compact composition with an icon and short text, and a richer composition with a title, supporting text and actions. Code has no variant switch for these layouts: supply the appropriate markup through the content slot. The Figma content slot similarly accepts a local component. Use hasArrow when the visual connection to the trigger is helpful.

Look and feel

Spark and Ocean style the panel and arrow. Keep any custom content consistent with the surrounding typography, spacing and actions rather than replacing the panel's visual language.

Behaviour

By default, clicking the trigger opens the popover. A second click, a click outside or Escape closes it. Bind open to close it from your own actions; openChanged reports every change. The popover does not move or trap focus. triggerMode="hover" opens it on hover or focus; "controlled" leaves visibility to your application. Use click or controlled interaction for content with actions.

Placement

Set placement to top, right, bottom (default) or left, optionally aligned with -start or -end. When space runs out, the popover flips and shifts to stay visible.

strategy="fixed" positions the panel relative to the viewport when it must escape a scrolling or clipped container. The default is absolute. Test the chosen placement at the edges of the actual layout.

Accessibility

Give the trigger an accessible name and make custom actions keyboard operable. The content slot does not supply dialog semantics or focus management for an arbitrary layout; provide those when its interaction requires them. Use a tooltip for a brief non-interactive hint instead.

Guidelines

  • Keep content short and relevant.
  • Use clear triggers whose label says what opens.
  • Keep popovers supplementary: do not hide essential actions or information people need to reference often.

Sources