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.
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.
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.
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.
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.
Typical use
<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.