OGE logoOGE

Overlay

@oge-ui/overlay is the suite's anchored-popup foundation: pure placement math with flip and viewport clamping, a DI-free panel behavior model, minimal popup chrome and a WAI-ARIA menu list. Panels render inline in the owner's template — there is no portal, and the package renders no user-facing strings of its own.

resolvePopupPosition OgeAnchoredPanel oge-popup oge-menu-list

Anchored panel

An OgeAnchoredPanel pairs an anchor element with a panel element and keeps the panel positioned: preferred placement, main-axis flip when the opposite side has more room, viewport clamping, repositioning on scroll/resize and panel growth. <oge-popup> supplies the fixed-position chrome and stays transparent until the first measure. Outside pointer-down and Escape close it by default.

OgeAnchoredPanel oge-popup flip + clamp

<oge-menu-list> implements the WAI-ARIA menu pattern with aria-activedescendant: the container holds real focus, arrows wrap and skip disabled items and separators, Home/End jump, printable keys type-ahead, Enter/Space activate. It is presentation-only — closing is delegated to the owner via closeRequest. Here it renders standalone (no popup) so the keyboard behavior is easy to try.

role=menu activedescendant type-ahead
last action: —

Notes

  • resolvePopupPosition is a pure function — unit-test your own overlay placement without any DOM.
  • Render the popup subtree behind @if (panel.isOpen()) and call panel.destroy() from DestroyRef; stacked overlays share a stack so Escape only closes the topmost.
  • OgeMenuItem is the canonical menu item of the suite — the same type drives the drop-down button in both render layers.