OGE logoOGE

Popover

<oge-popover> is an anchored, interactive panel — a title, rich body, footer actions, a close button and an optional callout arrow — opened from any element carrying [ogePopover] by click, hover, focus or code. It is a non-modal or modal role="dialog" rendered into the document body.

oge-popover [ogePopover] showOn modal arrow

Basics

Declare an <oge-popover> with a template reference and point [ogePopover] at it from any element. The trigger becomes an APG disclosure — aria-haspopup="dialog", aria-expanded and aria-controls — and the panel is a role="dialog" labelled by its title. *ogePopoverFooter receives a close function for the action bar; Escape, an outside click and the ✕ close it too.

[ogePopover] title *ogePopoverFooter arrow

Triggers

showOn picks what opens it: click (the default disclosure), hover — a short dwell, then a grace period that lets the pointer travel into the panel, and keyboard focus opens it too so the content is never pointer-only — focus, or manual for popovers driven only from code (#ref="ogePopover" → open() / close() / toggle()).

showOn click hover focus manual

Placement & arrow

placement prefers a side and alignment (top, right-start, bottom-end…) and flips when the viewport runs out of room, RTL-aware. [arrow]="true" draws a callout pointer on the edge facing the trigger; its geometry is shared with the tooltip and keeps pointing at the trigger after the viewport clamp shifted the panel. width / maxWidth size the content box.

placement arrow width / maxWidth

Non-modal (the default) follows the APG disclosure: focus stays on the trigger, Tab moves into the panel and on past it — the panel is rendered into the body, yet focus order matches the visual order — and leaving it closes it. [modal]="true" makes it an aria-modal dialog: focus moves inside (initialFocus), Tab is trapped, and focus returns to the trigger on close.

modal aria-modal Tab order initialFocus

Events & imperative API

[(visible)] is the two-way open state; writes from code run the same pipeline. opening and closing are cancelable and carry the reason (click, hover, focus, api / trigger, pointerLeave, focusOut, outside, escape, closeButton); opened and closed follow. Here “Pin” vetoes every close except the ✕.

[(visible)] opening / closing opened / closed open() / close()
visible: false · last: —

Notes

  • A popover is interactive; a tooltip is not. Use a tooltip for a short description of its trigger, a popover for content people act on.
  • Escape goes through the shared overlay stack: a select box opened inside a popover closes first, then the popover.
  • The trigger's focusable control carries the ARIA (the inner <button> of an oge-button); without a trigger, bind [anchor] for popovers opened from code.