Skip to content

YuePopover ​

YuePopover is a non-modal detached surface for interactive content near a trigger. It owns positioning, collision handling, Teleport, outside/Escape closing, stacking, and conditional focus restoration. Menu navigation, modal dialog behavior, and tooltip-specific policy belong to dedicated components.

Basic interactionA real Teleport surface: click the trigger to open, Escape or an outside click to close.

Placement and interactive content ​

Popover keeps content near its anchor. placement is the preferred position; it flips and shifts when space is limited. Form controls inside the panel remain real consumer-owned controls.

Filter panelbottom-start aligns a panel with the button edge; content clicks do not close it by default.

Trigger modes ​

Use click for stable action panels, and hover or focus for short explanations. Each mode uses the same trigger slot props, so events are not attached to an unintended element.

Hover and focusThe tooltip role changes the ARIA relationship; it does not add menu or dialog behavior.

External anchor and manual control ​

When there is no trigger slot, anchor supplies the positioning reference. trigger="manual" installs no automatic open/close events; the consumer owns the state.

manual + anchorA native element can be the anchor while the surface keeps the same collision and Teleport behavior.

Close policy and events ​

Use close-on-content-click for short flows that finish after a selection. The close event reports trigger, outside, escape, or programmatic as its reason.

Close after content clickThe event payload lets the consumer record the reason or decide what happens next.
Last close: Not closed yet

Typical use ​

vue
<YuePopover placement="bottom-start">
  <template #trigger="{ props }">
    <YueButton v-bind="props">Filters</YueButton>
  </template>
  <FilterPanel />
</YuePopover>

The component flips and shifts when space is limited and updates when the viewport, scroll container, or content size changes.

See the API and Guide.