A preview of a link's content, shown on hover and keyboard focus after a delay, hoverable across a safe area, non-modal, with detached triggers.
A preview of the content behind a link, shown while the link is hovered or keyboard-focused
(Base UI's PreviewCard; the APG has no pattern for it). It is not modal, never takes focus when it
opens, and stays open while hovered (WCAG 1.4.13). The link stays the way to the content: the
card is a glance for pointer and keyboard users, not something a reader needs.
Hover: the pointer entering the Trigger opens it after delay (reason trigger-hover);
leaving before then cancels. A touch tap follows the link and opens nothing.
Hoverable: leaving the Trigger closes it after closeDelay, unless the pointer reaches the
card across the safe area between them; it closes closeDelay after the pointer left both, or
the window. The hover intent and the hover bridge are Tooltip's, from the toolkit.
Keyboard: keyboard focus on the Trigger opens it after delay (trigger-focus), with focus
staying on the link; blur closes it at once (unless focus moved into the card), and so does
focus leaving the card (focus-out).
Dismissal: a non-modal layer: Escape closes it (escape-key) before an enclosing dialog,
and an outside press closes it (outside-press); a press inside it keeps it open.
Positioning: as the Popover's, from the Trigger, on the bottom by
default.
Detached triggers: Triggers anywhere in the page show the same Root through a handle,
each with a payload the content reads (detached triggers);
hovering another trigger of the open card moves it there at once (data-instant).
Lifecycle: onOpenChange is called before the change (details.cancel() keeps it),
onOpenChangeComplete(open) reports the end of each transition, the actions close() and
unmount() act from code, and the Portal's keepMounted keeps the Positioner in the page while
closed (hidden, data-closed).
Every part also takes what the primitive contract gives:
render (Vue: as and the render slot), a class and a style, a ref, and any attribute, which
it forwards. The names below are React's; Vue binds them the same way (v-model:open,
@open-change), and Angular as inputs and outputs ([(open)], (openChangeDetails)).
every change, with its reason (trigger-hover, trigger-focus, focus-out, escape-key, outside-press); called before the change, details.cancel() stops it
onOpenChangeComplete
(open: boolean) => void
once an opening or a closing has finished its transitions
actionsRef (react)
{ current: OverlayActions | null }
receives close() (reason imperative-action) and unmount(); Vue exposes them on the Root's template ref, Angular as the root directive's methods
role="presentation", data-side, data-align, data-open / data-closed; the anchor CSS variables, as the Popover's; hidden while kept mounted and closed
Popup
an id, tabindex="-1", data-side, data-align, data-open / data-closed, data-instant (a move to another trigger), data-starting-style, data-ending-style; no role