Skip to content
OGE logoOGE

Overlay API

Complete API reference for @oge-ui/overlay. Note that OgeAnchoredPanel is a plain DI-free class (not a component) and resolvePopupPosition is a pure function — see the demos for the wiring pattern.

Properties Methods Events Types

OgeModal

oge-modal

Properties 35

Content slots (structural directives)

Name Type DefaultDescription
*ogeModalTitleOgeModalTitle—Rich title slot, replacing the plain title text.
*ogeModalHeaderActionsOgeModalHeaderActions—Extra buttons rendered next to ✕. Presses that start here never begin a header drag.
*ogeModalFooterOgeModalFooter—Footer slot; $implicit is a close function whose optional argument becomes closed.result — <div *ogeModalFooter="let close">.
Name Type DefaultDescription
openedmodel<boolean>falseTwo-way open state. Setting it false directly closes without the guard pipeline. It still fires closed, with reason: 'api' — only closing and closeGuard are skipped. busy never blocks it.
fullScreenmodel<boolean>falseTwo-way full-screen state; size inputs are ignored while true. Driven by the maximize button when shown.
titlestring | undefined—Header text; also the aria-label fallback when the header is hidden.
ariaLabelstring | undefined—Accessible name override for headerless modals.
width / height / minWidth / minHeight / maxWidth / maxHeightnumber | string | undefined—Panel size — numbers are px, strings pass through. Default width min(560px, 100%).
placementOgeModalPlacement'center'Viewport position: the centre, an edge ('top' — command-palette style — 'bottom', logical 'start' / 'end') or a corner ('top-start' … 'bottom-end'). Logical values mirror in RTL.
dialogRoleOgeModalRole'dialog'ARIA role of the panel; 'alertdialog' for urgent confirmations (APG alert dialog) — what confirm() / alert() use.
ariaDescribedBystring | undefined—Id(s) of the element(s) describing the dialog — wired to aria-describedby.
shadingbooleantrueDims the page behind the modal. false keeps the backdrop transparent while staying fully modal.
showCloseButtonbooleantrueShows the header ✕ button. Hiding it leaves Escape working — set closeOnEscape to false as well for a dialog the user must answer.
showMaximizeButtonbooleanfalseShows a maximize/restore toggle in the header, driving fullScreen.
dragEnabledbooleanfalseLets the user drag the panel by its header (viewport-clamped unless dragOutsideBoundary).
dragOutsideBoundarybooleanfalseAllows dragging the panel beyond the viewport edges.
restorePositionbooleantrueResets drag offset and resized size on every reopen.
resizeEnabledbooleanfalseShows a bottom-end resize handle (min 160×120, viewport-capped).
inertBackgroundbooleanfalseMarks everything outside the modal inert while open — opt-in; content appended to body after opening is not covered.
closeOnEscapebooleantrueEscape closes the modal when it is the topmost overlay (popups inside close first).
closeOnBackdropClickbooleantrueA click that starts and ends on the backdrop closes the modal — a text-selection drag released outside never does.
scrollLockbooleantrueLocks body scroll while open (scrollbar-width compensated, ref-counted across stacked modals).
autoFocusOgeModalAutoFocus'first-tabbable'Initial focus target; an [autofocus] element inside the panel always wins. false (as on the window) focuses the panel itself and no control — no on-screen keyboard pops up for a first text field.
restoreFocusbooleantrueRestores focus to the opener on close — only when focus would otherwise be lost.
paddingbooleantruefalse makes the body flush for grids and custom layouts.
busybooleanfalseSpinner veil + aria-busy; user-initiated closes are blocked, programmatic close() still works.
loadingbooleanfalseSpinner veil and aria-busy over the body while content loads — unlike busy, closes still work.
closeGuard() => boolean | Promise<boolean> | undefined—Veto hook run before every pipeline close; may be async (single-flight — see closePending). A rejected promise vetoes with a dev warning.
messagesPartial<OgeOverlayMessages> | undefined—Per-instance message overrides.
panelClassOgeClassValue | undefined—Extra classes on the dialog panel, next to oge-modal (string, array or { name: boolean }).
backdropClassOgeClassValue | undefined—Extra classes on the backdrop layer that wraps the panel.
bodyClassOgeClassValue | undefined—Extra classes on the body, the container of the projected content.
bodyStyleRecord<string, string> | undefined—Inline styles on the body.
panelAttributesOgeHtmlAttributes | undefined—Extra attributes on the dialog panel (data-testid…). Filtered by ogeSafeAttributes: event handlers (on*), srcdoc, style, class, script URLs and the attributes the component sets itself are dropped (one dev-mode warning per key).
closePendingSignal<boolean>—true while an async closeGuard is pending — disable footer actions with it.

Methods 5

Name Type Description
open(): voidvoidOpens the modal.
close(result?: R): voidvoidCloses through the full pipeline (closing → closeGuard); reason 'api', the argument becomes closed.result.
toggle(): voidvoidOpen ⇄ close.
focus(): voidvoidRe-applies the initial-focus resolution. No-op while closed.
toggleFullScreen(): voidvoidSwitches between windowed and full-screen (the maximize button’s action).

Events 5

Name Type Description
openingOgeModalOpeningEventCancelable: fires before the modal opens (any open path). Set cancel = true to keep it closed.
closingOgeModalClosingEventCancelable: fires before any pipeline close (Escape, backdrop, ✕, close()). Set cancel = true to keep the modal open.
closeBlockedOgeModalCloseBlockedEventA close did not go through — { reason, blockedBy: 'busy' | 'closing' | 'guard' } says why, so the UI can explain it ("Saving…", "Unsaved changes").
closedOgeModalClosedEvent<R>Fires after the modal closed, with the reason and the optional result.
resizeStarted / resizedOgeModalResizeEventFire when a resize gesture starts (starting size) and ends (final size).

Types 10

Name Type Description
OgeModalCloseReason'api' | 'escape' | 'backdrop' | 'closeButton'Why the modal closed.
OgeModalClosingEvent{ reason: OgeModalCloseReason; cancel: boolean }Cancelable pre-close event.
OgeModalClosedEvent<R>{ reason: OgeModalCloseReason; result?: R }Post-close event; result comes from close(result) or the slot close function.
OgeModalAutoFocus'first-tabbable' | 'panel' | stringInitial-focus strategy — a plain string is treated as a CSS selector inside the panel.
OgeModalPlacement'center' | 'top' | 'bottom' | 'start' | 'end' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end'Where the panel sits in the viewport; start / end are logical (mirror in RTL).
OgeModalRole'dialog' | 'alertdialog'ARIA role of the modal panel.
OgeModalOpeningEvent{ cancel: boolean }Cancelable pre-open event.
OgeModalResizeEvent{ width: number; height: number; event: PointerEvent }Payload of the resize outputs.
OgeModalSlotContext{ $implicit: (result?: unknown) => void }Context of *ogeModalTitle / *ogeModalHeaderActions / *ogeModalFooter; the function closes the modal.
*ogeModalHeaderActionsstructural slotCustom title-bar buttons, rendered between the title and the maximize/✕ buttons; presses here never start a header drag.

OgeModalService

Methods 4

Name Type Description
open<R, D>(content: Type<unknown> | TemplateRef, config?: OgeModalOpenConfig<D>): OgeModalRef<R>OgeModalRef<R>Opens a body-appended modal hosting the component or template — the escape hatch for transformed ancestors and for prompt/confirm flows without a declared <oge-modal>.
confirm(options: string | OgeConfirmOptions): Promise<boolean>Promise<boolean>Asks a yes/no question in an APG alert dialog (role="alertdialog", described by the message): true for the primary button, false for Cancel and Escape. danger (default: severity === 'danger') styles the primary button as destructive and moves the initial focus to Cancel; otherwise the primary button has it. A string argument is the message.
alert(options: string | OgeAlertOptions): Promise<void>Promise<void>Shows a message with a single OK button (APG alert dialog); Escape acknowledges it too.
prompt(options: string | OgePromptOptions): Promise<string | null>Promise<string | null>Asks for a line of text: the submitted value, or null for Cancel and Escape. The field has the initial focus and Enter submits unless invalid; required and validate (sync or async — OK waits, latest call wins) render the error beside the field with aria-invalid + aria-describedby and announce it.

Types 9

Name Type Description
OgeModalOpenConfig<D>objectThe declarative inputs minus slots (title, sizing, placement, closeGuard, …) plus data?: D, made available to the content via OGE_MODAL_DATA. Part styling: panelClass, backdropClass, bodyClass, bodyStyle, panelAttributes (as on the modal).
OgeModalRef<R>{ close(result?: R): void; closed: Promise<OgeModalClosedEvent<R>> }Handle of a service-opened modal; content components can inject it to close themselves with a result.
OGE_MODAL_DATAInjectionToken<unknown>The config.data payload, injectable in the content component.
OgeConfirmOptions{ title?; message?; severity?; icon?; okText?; cancelText?; danger?; details?; typeToConfirm?; acknowledgeLabel?; canAccept?; width?; panelClass?; backdropClass?; panelAttributes? }Options of confirm(). title defaults to the localized dialogConfirmTitle, okText / cancelText to dialogOk / dialogCancel; icon: false hides the severity icon, a TemplateRef replaces it; width defaults to 400. Gates of an irreversible action: details (a text, or a list shown as bullets), typeToConfirm (text the user must type exactly; the field is labelled by the localized dialogTypeToConfirm), acknowledgeLabel (a checkbox to tick) and canAccept(state) (your own rule) — the primary button stays disabled until all pass.
OgeAlertOptions{ title?; message?; severity?; icon?; okText?; width?; panelClass?; backdropClass?; panelAttributes? }Options of alert() (no Cancel button; the title defaults to dialogAlertTitle). Every dialog helper also takes the modal part options panelClass, backdropClass and panelAttributes (filtered; the dialog keeps its own role).
OgePromptOptionsOgeConfirmOptions & { defaultValue?; placeholder?; label?; inputType?; required?; validate? }Options of prompt(): the field’s initial text, placeholder, visible label (without one the field is labelled by the message or title), native type, the required rule (dialogRequired message) and the custom validator; the title defaults to dialogPromptTitle.
OgeDialogSeverity'info' | 'success' | 'warning' | 'danger'Tone of a helper dialog — picks the built-in icon and its colour.
OgePromptInputType'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'search'Native type of the prompt field.
OgePromptValidator(value: string) => string | null | Promise<string | null>Return an error message to block the submit, null to accept; a rejected promise blocks without a message.

OgeWindow

oge-window

Properties 21

Name Type DefaultDescription
openedmodel<boolean>falseTwo-way open state. Setting it false directly closes without the closing event.
statemodel<OgeWindowState>'normal'Two-way display state: 'normal', 'minimized' (title bar only) or 'maximized' (fills the viewport). An outside write runs the cancelable pipeline.
titlestring | undefined—Title-bar text; also the accessible name (aria-labelledby).
ariaLabelstring | undefined—Accessible name when there is no title.
positionOgeWindowPosition | null | undefined—Explicit top-left corner ({ x, y } in viewport px, x = left edge in both directions); wins over placement and moves the open window when it changes.
placementOgeWindowPlacement'center'Where the window opens without a position — the modal’s nine placements, RTL-aware. A new placement re-places an open window; a reopened window otherwise keeps its last box.
width / heightnumber | string | undefined—Initial size — numbers are px, strings pass through. Default width min(420px, 100vw - 32px), height from the content. A user resize wins.
minWidth / minHeightnumber | undefined200 / 120Smallest size (px) a resize may reach.
maxWidth / maxHeightnumber | undefined—Largest size (px); default the viewport.
zIndexnumber | undefined—Base z-index; the window’s stacking layer is added to it. Default: calc(var(--oge-z-window) + layer) — below anchored popups and modals.
draggablebooleantrueThe title bar drags the window (shared pointer gesture; Escape mid-drag puts it back) and the arrow keys move the focused frame.
resizablebooleantrueEight edge/corner handles resize the window; Ctrl/⌘ + arrows on the focused frame are the keyboard twin.
keepInViewportbooleantrueKeeps the whole window on screen; false lets it hang off the sides and bottom while 48px of the title bar stay reachable. A viewport resize re-clamps.
showMinimizeButtonbooleantrueShows the minimize / restore title-bar button.
showMaximizeButtonbooleantrueShows the maximize / restore title-bar button; a title-bar double-click toggles too.
showCloseButtonbooleantrueShows the ✕ title-bar button.
closeOnEscapebooleantrueEscape closes the window while focus is inside it and no popup or modal is open. Windows never join the modal Escape stack.
autoFocusOgeWindowAutoFocus'first-tabbable'Where focus lands on open — resolved in the body (never on the title-bar buttons), falling back to the frame; false leaves focus alone.
restoreFocusbooleantrueRestores focus to the opener on close — only when focus would otherwise be lost.
paddingbooleantruefalse makes the body flush.
messagesPartial<OgeOverlayMessages> | undefined—Per-instance message overrides (button labels windowMinimize / modalMaximize / modalRestore / modalClose, announcements windowMoved / windowResized).

Methods 11

Name Type Description
open(): voidvoidOpens the window.
close(): voidvoidCloses through the cancelable closing event; reason 'api'.
toggle(): voidvoidOpen ⇄ close.
minimize(): booleanbooleanCollapses the window to its title bar; false when vetoed.
maximize(): booleanbooleanFills the viewport (inside the safe-area insets); false when vetoed.
restore(): booleanbooleanBack to the normal box; false when vetoed or already normal.
bringToFront(): voidvoidRaises the window above the other open windows (a press or focus does it too).
center(): voidvoidRe-centres the window in the viewport and fires the moved event.
moveTo(x: number, y: number): voidvoidMoves the top-left corner (clamped) and fires the moved event with source 'api'.
resizeTo(width: number, height: number): voidvoidResizes (min/max-limited, top-left fixed) and fires the resized event.
focus(): voidvoidMoves focus into the window (the autoFocus resolution).

Events 8

Name Type Description
openingOgeWindowOpeningEventCancelable: fires before the window opens (any open path).
closingOgeWindowClosingEventCancelable: fires before Escape / ✕ / close() closes the window, with the reason.
closedOgeWindowClosedEventFires after the window closed, with the reason.
movedOgeWindowMovedEventFires after a drag, a keyboard move, center(), moveTo() or a position / placement change — new x/y and the source ('pointer' | 'keyboard' | 'api').
resizedOgeWindowResizedEventFires after a resize gesture (with the edge), a keyboard resize or resizeTo().
stateChangingOgeWindowStateChangingEventCancelable: fires before minimize / maximize / restore (buttons, double-click, Alt+↑/↓, the state binding, methods).
stateChangedOgeWindowStateChangedEventFires after the display state changed.
activatedvoidFires when the window becomes the frontmost (active) one.

Types 12

Name Type Description
OgeWindowState'normal' | 'minimized' | 'maximized'Display state.
OgeWindowPlacementOgeModalPlacementThe modal's placements: 'center', edges and corners.
OgeWindowPosition{ x: number; y: number }Top-left corner in viewport px.
OgeWindowAutoFocusOgeModalAutoFocus | falseInitial-focus strategy; false leaves focus where it is.
OgeWindowCloseReason'api' | 'escape' | 'closeButton'Why the window closed.
OgeWindowMovedEvent{ x; y; source: 'pointer' | 'keyboard' | 'api'; event? }Payload of the moved event.
OgeWindowResizedEvent{ width; height; edge?: OgeWindowResizeEdge; source; event? }Payload of the resized event.
OgeWindowResizeEdge'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw'The eight resize handles (physical compass edges).
OgeWindowStateChangingEvent{ state; previousState; cancel: boolean }Cancelable pre-state-change event.
OgeWindowStateChangedEvent{ state; previousState }Post-state-change event.
OgeWindowOpeningEvent / OgeWindowClosingEvent / OgeWindowClosedEvent{ cancel } / { reason; cancel } / { reason }Open/close pipeline payloads.
Keyboard (focused frame)aria-keyshortcutsArrows move 10px, Ctrl/⌘ + arrows resize, Shift = 1px steps, Alt+↑ maximize (or restore from minimized), Alt+↓ minimize (or restore from maximized), Escape closes (focus inside, no popup open). Moves and resizes are announced politely.

OgeToastService

Properties 19

OgeToastOptions

Name Type DefaultDescription
messagestring (required)—Body text; also the screen-reader announcement.
titlestring | undefined—Optional bold first line above the message.
severityOgeToastSeverity'info'Drives the accent bar, icon and announcement mode.
displayTimenumberconfig toastDisplayTime (4000)Auto-dismiss time in ms.
stickybooleanfalseNever auto-dismisses (loading toasts are implicitly sticky).
closablebooleantrueShows the ✕ button; aria label from messages.toastClose.
closeOnClickbooleanfalseA click anywhere on the toast closes it (reason 'click'); button presses excluded.
progressBarbooleanconfig toastProgressBar (false)Remaining-time bar — freezes exactly in sync with the paused timer.
actionOgeToastAction | undefined—Inline action button; pressing it runs handler and closes with reason 'action'.
positionOgeToastPositionconfig toastPosition ('bottom-end')Region override for this toast.
announceOgeToastAnnounceseverity-derived'assertive' for errors, 'polite' otherwise; 'off' silences.
announceTextstring | undefined—Screen-reader text override — announced instead of title + message, so the visual text can stay short.
iconTemplateRef<void> | undefined—Replaces the severity icon (the loading spinner still wins).
loadingbooleanfalseSpinner instead of the severity icon; implicitly sticky while true.
coalescebooleanconfig toastCoalesceDuplicates (false)Merge with an identical visible toast into one with a live ×N badge (timer restarts, same ref returned).
idstring | undefined—Coalesce key override; defaults to severity+title+message.
cssClassstring | undefined—Extra class(es) on the toast element.
templateTemplateRef<OgeToastSlotContext> | undefined—Replaces the title/message body; $implicit closes the toast, data is in context.
dataD | undefined—Arbitrary payload surfaced in the template context and action event.

Methods 7

OgeToastService

Name Type Description
show<D>(toast: string | OgeToastOptions<D>): OgeToastRef<D>OgeToastRefShows a toast; a bare string becomes an info toast. SSR-safe no-op.
success / info / warning / error(message, options?): OgeToastRefOgeToastRefSeverity sugar for show().
promise<T, D>(promise, options): OgeToastRef<D>OgeToastRefSticky spinner toast that morphs in place when the promise settles; the timer starts then. success/error accept a message or a function returning a message or an update patch.
clear(position?: OgeToastPosition): voidvoidCloses every toast (or one region) with reason 'clear'.

OgeToastRef

Name Type Description
close(): voidvoidCloses the toast (reason 'api').
update(patch: OgeToastUpdate): voidvoidPatches the toast in place; timing changes restart the timer, a changed message re-announces.
closedPromise<OgeToastClosedEvent>Resolves after the toast closed (exit transition included), with the typed reason.

Types 6

Name Type Description
OgeToastSeverity'info' | 'success' | 'warning' | 'error'Toast severity.
OgeToastPosition'top-start' | 'top-center' | 'top-end' | 'bottom-start' | 'bottom-center' | 'bottom-end'Logical, RTL-aware region positions.
OgeToastCloseReason'timeout' | 'closeButton' | 'click' | 'action' | 'api' | 'clear' | 'swipe'Why a toast closed — 'swipe' when stack mode's swipe-to-dismiss sent it away.
OgeToastAction<D>{ text: string; handler?: (event: OgeToastActionEvent<D>) => void }Inline action button.
OgeToastSlotContext<D>{ $implicit: () => void; data?: D }Context of a template toast body.
Config keystoastPosition · toastDisplayTime · toastMaxVisible · toastProgressBar · toastCoalesceDuplicates · toastStackedDefaults via provideOgeOverlayConfig(); strings via messages.toastClose/toastRegionLabel/toastCountBadge.

OgeLiveAnnouncer

Methods 2

OgeLiveAnnouncer

Name Type Description
announce(message: string, options?: OgeLiveAnnounceOptions | OgeLivePoliteness): voidvoidSpeaks message through the polite (default) or assertive region. Written after delay ms (default 100) — a newer message to the same region inside that window supersedes it (debounce); the identical message inside a second is dropped; the region clears after clearAfter ms (default 5000) so a repeat is announced again. Empty text and the server are no-ops.
clear(politeness?: OgeLivePoliteness): voidvoidEmpties one region (or both) and drops anything still pending.

Types 4

Name Type Description
inject(OgeLiveAnnouncer)Injectable({ providedIn: 'root' })Service in @oge-ui/overlay — the lowest Angular package the grid, tree list, Gantt, uploader and toast share. A no-op on the server platform.
OgeLivePoliteness'polite' | 'assertive'Which of the two shared regions speaks.
OgeLiveAnnounceOptions{ politeness?: OgeLivePoliteness; delay?: number; clearAfter?: number }delay: 0 writes synchronously — for a caller that already cleared and waited itself (the toast engine).
OgeLiveAnnouncerCore / getOgeLiveAnnouncer(doc?)@oge-ui/behaviorThe framework-free engine both layers wrap: one polite and one assertive visually hidden aria-live region per document (.oge-live-announcer[data-oge-live-announcer], no role, created on the first announcement, never inerted by a modal’s inertBackground). Every OGE announcement — grid, tree list, toast, Gantt, uploader — goes through it; components never render their own live regions.

OgePopover

oge-popover

Properties 27

Trigger & content slots

Name Type DefaultDescription
[ogePopover]OgePopoverTrigger — input: OgePopover (required)—Trigger directive: <button [ogePopover]="pop"> opens the <oge-popover #pop> per its showOn and carries the trigger ARIA (aria-haspopup="dialog" for click / manual, aria-expanded, aria-controls while open) on its focusable control — the inner <button> of an oge-button. Several triggers may share one popover; the panel anchors to the one that opened it.
*ogePopoverTitleOgePopoverTitle—Rich title slot, replacing the plain title text (still labels the dialog). Context: OgePopoverSlotContext.
*ogePopoverFooterOgePopoverFooter—Footer (actions) bar; $implicit closes the popover with reason closeButton — <div *ogePopoverFooter="let close">.
ogePopoverContentOgePopoverContent—Lazy body: <ng-template ogePopoverContent let-close> is instantiated only while the popover is open and destroyed on close. Projected <ng-content> children are created with the host even while closed, so put heavy content here.
Name Type DefaultDescription
visiblemodel<boolean>falseTwo-way open state ([(visible)]). Writes from code run the cancelable opening / closing events with reason api; a vetoed write is written back.
titlestring | undefined—Title text in the header; labels the dialog (aria-labelledby).
ariaLabelstring | undefined—Accessible name when there is no title.
showOnOgePopoverShowOn'click'What opens it from a trigger: 'click' (the APG disclosure), 'hover' (dwell + a grace period that survives moving into the panel; keyboard focus opens it too), 'focus' or 'manual' (code only).
placementOgePopupPlacement'bottom'Preferred side; flips and clamps against the viewport, RTL-aware.
arrowbooleanfalseDraws a callout arrow on the edge facing the trigger (geometry shared with the tooltip).
modalbooleanfalsetrue: an aria-modal dialog — focus moves in, Tab is trapped, focus returns to the trigger on close. false: a non-modal dialog — focus stays on the trigger, Tab moves into the panel and on past it (as if it followed the trigger inline), and focus leaving closes it.
showCloseButtonbooleantrueRenders the header ✕ — labelled by messages.popoverClose.
widthnumber | string | undefined—Content width — px number or CSS length.
maxWidthnumber | string | undefined—Maximum content width — px number or CSS length; the stylesheet default is 360px.
showDelaynumber | undefined—Hover dwell before opening (hover mode); falls back to popoverShowDelayMs.
hideDelaynumber | undefined—Grace period before closing after the pointer left trigger and panel; falls back to popoverHideDelayMs.
initialFocusOgePopoverInitialFocus'auto'Focus target on click / API opens: 'auto' (first tabbable when modal, none otherwise), 'none', 'first-tabbable', 'panel' or a CSS selector. Hover / focus opens never move focus; an [autofocus] element always wins.
restoreFocusbooleantrueReturns focus to the trigger when a close would lose it (never after an outside click or a focus move).
closeOnEscapebooleantrueEscape closes it — through the shared overlay stack, so a select box open inside closes first.
closeOnOutsideClickbooleantrueA pointer-down outside trigger and panel closes it.
closeOnFocusOutbooleantrueFocus moving outside trigger and panel closes a non-modal popover. Turn it off when the panel hosts editors whose popups take focus elsewhere.
padding'none' | 'sm' | 'md''md'Body padding preset: 'none' (flush — lists, menus, grids), 'sm' or 'md'. Sets --oge-popover-body-padding on the panel.
disabledbooleanfalsePrevents opening; closes an open popover.
anchorHTMLElement | nullnullElement to anchor to when no trigger opened it (a popover opened from code); falls back to the first [ogePopover] trigger.
messagesPartial<OgeOverlayMessages> | undefined—Per-instance message overrides — popoverClose labels the ✕.
panelClassOgeClassValue | undefined—Extra classes on the panel element, next to oge-popover.
panelAttributesOgeHtmlAttributes | undefined—Extra attributes on the panel element. Filtered by ogeSafeAttributes: event handlers (on*), srcdoc, style, class, script URLs and the attributes the component sets itself are dropped (one dev-mode warning per key).

Methods 4

Template reference (exportAs: 'ogePopover')

Name Type Description
open(): voidvoidOpens it (reason api; runs opening).
close(): voidvoidCloses it (reason api; runs closing).
toggle(target?): voidvoidOpens a closed popover, closes an open one. With a target (an event — its currentTarget — or an element) the panel anchors to it; an open popover given a different target moves there instead of closing.
show(target): voidvoidOpens the popover anchored to target (an event — its currentTarget — or an element); already open, it moves there. Focus returns to that element on close — one popover serves many triggers (column headers, row actions).

Events 4

Name Type Description
openingOgePopoverOpeningEventCancelable, before every open: { reason, cancel }, reason click | hover | focus | api.
openedOgePopoverOpenedEventAfter it opened: { reason }.
closingOgePopoverClosingEventCancelable, before every close: { reason, cancel }, reason api | trigger | pointerLeave | focusOut | outside | escape | closeButton.
closedOgePopoverClosedEventAfter it closed: { reason }.

Types 8

Name Type Description
OgePopoverTriggerdirective — selector [ogePopover], exportAs 'ogePopoverTrigger'The class behind [ogePopover]; import it next to OgePopover.
OgePopoverShowOn'click' | 'hover' | 'focus' | 'manual'Trigger interaction model.
OgePopoverOpenReason'api' | 'click' | 'hover' | 'focus'Why it opened.
OgePopoverCloseReason'api' | 'trigger' | 'pointerLeave' | 'focusOut' | 'outside' | 'escape' | 'closeButton'Why it closed.
OgePopoverInitialFocus'auto' | 'none' | 'first-tabbable' | 'panel' | (string & {})Initial-focus strategy (a string is a CSS selector).
OgePopoverSlotContext{ $implicit: () => void; close: () => void }Context of *ogePopoverTitle / *ogePopoverFooter.
OgePopoverOpeningEvent / OgePopoverClosingEvent{ readonly reason; cancel: boolean }Cancelable pre-events.
OgePopoverOpenedEvent / OgePopoverClosedEvent{ readonly reason }Past-tense events.

OgeActionSheet

oge-action-sheet

Properties 11

Name Type DefaultDescription
openedboolean (model)falseTwo-way open state. A direct false write closes without the closing event (the app already decided); user gestures and close() run it.
itemsreadonly OgeActionSheetItem[][]The actions, in order — group: 'bottom' ones render after a divider. Fields: key?, text, description?, icon? (SVG path data, 24×24, stroked), destructive?, disabled?, group?: 'top' | 'bottom'.
titlestring | undefined—Heading of the sheet — also its accessible name (aria-labelledby) and the name of the action menu.
descriptionstring | undefined—Secondary text under the title, referenced by aria-describedby.
ariaLabelstring | undefined—Accessible name without a title; falls back to the actionSheetLabel message (“Actions”).
showCancelbooleantrueRenders the Cancel button after the menu (a separate Tab stop).
cancelTextstring | undefined—Text of the Cancel button; falls back to the actionSheetCancel message.
closeOnBackdropClickbooleantrueCloses on a press on the shaded backdrop.
closeOnEscapebooleantrueCloses on Escape — only while the sheet is the topmost surface on the shared overlay stack.
swipeToClosebooleantrueCloses on a swipe down (≥ 72px) from the handle or the header, on the shared pointer gesture.
messagesPartial<OgeOverlayMessages> | undefined—Per-instance overrides of actionSheetCancel / actionSheetLabel.

Methods 3

Name Type Description
open()() => Promise<OgeActionSheetResult>Opens the sheet (runs the cancelable opening) and resolves with the chosen action, or null when it is dismissed or the open is vetoed.
close()() => voidCloses the sheet with reason 'api' (runs closing).
toggle()() => voidOpens a closed sheet, closes an open one.

Events 4

Name Type Description
openingOgeActionSheetOpeningEventCancelable: the sheet is about to open (open() / toggle()). Set cancel to keep it closed.
closingOgeActionSheetClosingEventCancelable: the sheet is about to close — reason ('action', 'cancel', 'escape', 'backdrop', 'swipe', 'api') and the chosen item.
closedOgeActionSheetClosedEventThe sheet closed — reason and the chosen item (or null). Focus is back on the element focused before it opened.
itemClickOgeActionSheetItemClickEventAn action was chosen (click, Enter or Space) — item, index, event. Set keepOpen to keep the sheet open; disabled actions never fire it.

Types 9

Templates

Name Type Description
OgeActionSheetItemTemplate[ogeActionSheetItemTemplate]Structural directive replacing the icon + text of every action. The menuitem button, its keyboard and its disabled / destructive state stay with the sheet, so keep the template non-interactive. Projected content renders between the header and the actions.
OgeActionSheetItemTemplateContext{ $implicit: OgeActionSheetItem; index: number }Context of the item template.

Vocabulary

Name Type Description
OgeActionSheetIteminterfaceOne action: key?, text, description?, icon? (SVG path data, 24×24, stroked), destructive?, disabled?, group?: 'top' | 'bottom'.
OgeActionSheetCloseReason'action' | 'cancel' | 'escape' | 'backdrop' | 'swipe' | 'api'Why the sheet closed.
OgeActionSheetOpeningEvent{ cancel: boolean }Payload of opening.
OgeActionSheetClosingEvent{ reason; item: OgeActionSheetItem | null; cancel: boolean }Payload of closing.
OgeActionSheetClosedEvent{ reason; item: OgeActionSheetItem | null }Payload of closed.
OgeActionSheetItemClickEvent{ item; index: number; event: Event; keepOpen: boolean }Payload of itemClick.
OgeActionSheetResultOgeActionSheetItem | nullWhat open() resolves with.

OgeCommandPalette

oge-command-palette

Properties 8

Name Type DefaultDescription
commandsreadonly OgeCommand[] (required)—The commands, in order. Fields: id, label, group? (the heading it is listed under), keywords? (extra words that find it), description?, shortcut? (shown as a kbd, e.g. Mod+Shift+P), icon? (SVG path data), disabled?, run? (called on run).
openedboolean (model)falseTwo-way open state. Opening clears the query and focuses the search box.
recentreadonly string[] (model)[]Ids of the recently run commands, newest first, listed in a "Recent" section above an empty query — two-way, so an app can persist it.
hotkeystring | null'Mod+K'Global shortcut that toggles the palette — Mod is ⌘ on Apple platforms and Ctrl elsewhere. null turns it off. A keydown another handler already prevented is ignored.
placeholderstring | undefinedcommandPalettePlaceholder messagePlaceholder of the search box.
recentLimitnumber5How many recent commands to keep and list; 0 turns the recent section off.
maxResultsnumber50Upper bound of listed matches for a query (the empty query lists every command).
messagesPartial<OgeOverlayMessages>—Per-instance overrides of commandPaletteLabel, commandPalettePlaceholder, commandPaletteEmpty, commandPaletteRecent and commandPaletteResults.

Methods 3

Name Type Description
open()() => voidOpens the palette with an empty query.
close()() => voidCloses the palette; focus returns to where it was.
toggle()() => voidOpens a closed palette, closes an open one.

Events 3

Name Type Description
commandExecuteOgeCommandExecuteEventA command was chosen — by Enter or a click — after its own run. The palette closes unless the handler sets keepOpen.
recentChangereadonly string[]The banana half of [(recent)]: the recent list after a run.
queryChangestringThe query changed (also when opening or closing clears it).

Types 12

Matching & keyboard

Name Type Description
MatchingogeFuzzyMatchAccent- and case-insensitive fuzzy matching: the query’s characters in order ("gtst" finds "Go to settings"), a prefix first, then a word start (camelCase counts), then a contiguous hit, then a scattered one; keywords score at 80 % and the description at 60 %. Matches keep their groups, each ordered by its best hit, and the matched characters are wrapped in <mark>.
Keyboardrole="combobox" → role="listbox"The search box is an APG combobox over a listbox (aria-activedescendant): ↑ / ↓ move and wrap, skipping disabled commands; Page Up / Page Down move by eight; Ctrl+Home / Ctrl+End jump (plain Home / End stay with the text); Enter runs; Escape or a backdrop press closes and focus returns to where it was. A polite status announces the result count.

Vocabulary

Name Type Description
OgeCommandinterfaceOne command: id, label, group? (the heading it is listed under), keywords? (extra words that find it), description?, shortcut? (shown as a kbd, e.g. Mod+Shift+P), icon? (SVG path data), disabled?, run? (called on run).
OgeCommandExecuteEvent{ command: OgeCommand; keepOpen: boolean }Payload of commandExecute.
ogeFuzzyMatch(query, text) => OgeFuzzyMatch | nullThe matcher on its own: { score, ranges } with [start, end) ranges in the source text, or null.
ogeMatchesShortcut(event, shortcut, apple?) => booleanWhether a keydown is a shortcut such as Mod+K — for wiring the commands’ own shortcuts.
ogeFormatShortcut(shortcut, apple?) => stringA shortcut for display: ⇧⌘P on Apple platforms, Ctrl+Shift+P elsewhere.

Behavior building blocks (@oge-ui/behavior)

Name Type Description
ogeCommandPaletteSections / ogeCommandPaletteOptions(commands, query, { recent?, limit? }) => OgeCommandPaletteSection[]The grouped result list ({ key, group, recent, options }, each option { command, index, score, segments }) and its flat keyboard order.
ogeCommandPaletteKeyIntent / ogeCommandPaletteFirstActive(event, active, options, page?) => OgeCommandPaletteKeyIntent | nullThe key map ({ kind: 'move' | 'run', index }) and the option made active when the list changes.
ogeCommandPaletteRecent(recent, id, limit) => string[]The recent list after a run: newest first, de-duplicated, bounded.
ogeFuzzyHighlight / ogeParseShortcut / ogeIsApplePlatformhelpersRanges → SearchHighlightSegment[]; Mod+Shift+P → OgeShortcut; whether Mod means ⌘.
OgeFuzzyMatch / OgeCommandPaletteSection / OgeCommandPaletteOption / OgeCommandPaletteFilterOptions / OgeCommandPaletteKeyIntent / OgeShortcuttypesThe shapes of the building blocks above.

OgeTour

oge-tour

Properties 7

Name Type DefaultDescription
stepsreadonly OgeTourStep[] (required)—The steps, in order. Fields: target? (a CSS selector, an element or a function returning one — missing, hidden or absent centers the card), title (the dialog’s name), content? (its description), placement? (an OgePopupPlacement, default 'bottom', flipped to fit), padding? (spotlight padding in px, default 6).
openedboolean (model)falseTwo-way open state.
stepnumber (model)0Two-way index of the shown step, clamped to the steps.
closeOnEscapebooleantrueEscape skips the tour.
closeOnBackdropClickbooleanfalseA press on the dimmed page skips the tour. Off by default: a stray click should not lose the user’s place.
showSkipbooleantrueRenders the Skip button (never on the last step).
messagesPartial<OgeOverlayMessages>—Per-instance overrides of tourLabel, tourStep, tourNext, tourPrevious, tourSkip and tourDone.

Methods 4

Name Type Description
start(step?)(step?: number) => voidOpens the tour at step (default the first).
next()() => voidThe next step; on the last one, finishes the tour ('done').
previous()() => voidThe previous step (no-op on the first).
close()() => voidCloses the tour (reason 'api').

Events 2

Name Type Description
stepChangenumberThe banana half of [(step)].
closedOgeTourClosedEventThe tour closed: { reason, step } with 'done' (Done on the last step), 'skip', 'escape', 'backdrop' or 'api' — store it to show a tour once.

Types 7

Behavior

Name Type Description
Spotlight, card & keysrole="dialog"Each step dims the page with a spotlight cut around its target, scrolls the target into view (centered; instantly under prefers-reduced-motion, which also stops the spotlight from gliding) and places the card beside it, re-measuring on scroll and resize. The card is a modal role="dialog" (aria-roledescription from tourLabel) with a step counter, Skip, Back and Next — Done on the last step. Focus starts on Next; → / ← move between steps (mirrored in RTL) but never finish the tour; Escape skips; focus returns where it was. A polite status announces “Step 2 of 4: title”.

Vocabulary

Name Type Description
OgeTourStepinterfaceOne step: target? (a CSS selector, an element or a function returning one — missing, hidden or absent centers the card), title (the dialog’s name), content? (its description), placement? (an OgePopupPlacement, default 'bottom', flipped to fit), padding? (spotlight padding in px, default 6).
OgeTourClosedEvent{ reason: OgeTourCloseReason; step: number }Payload of closed.
OgeTourCloseReason'done' | 'skip' | 'escape' | 'backdrop' | 'api'Why the tour closed.

Behavior building blocks (@oge-ui/behavior)

Name Type Description
ogeTourResolveTarget / ogeTourReveal(target, doc) => Element | null / (element) => voidThe rendered element a step points at; scrolling it into view (reduced-motion aware).
ogeTourSpotlight / ogeTourCardPosition / OgeTourCardPositiongeometryThe padded, viewport-clipped spotlight rect and the card position beside it (via resolvePopupPosition), or centered.
ogeTourKeyIntent / ogeTourClampStep / ogeTourIsInViewhelpers→ / ← to 'next' / 'previous' (RTL-mirrored); the clamped step index; whether a rect is fully visible.

OgeNotificationCenter

oge-notification-center

Properties 9

Name Type DefaultDescription
itemsreadonly OgeNotification[] (model)[]Two-way: the notifications, newest first whatever the order given. Marking read or dismissing writes a new array. Fields: id, title, body?, time (a Date, an ISO string or epoch ms — shown as a relative time, “5 minutes ago”), read?, group? (the section with grouping="group"), severity? (info, success, warning, danger: the mark’s colour).
openedboolean (model)falseTwo-way: the panel is open.
grouping'day' | 'group' | 'none''day'Sections: Today / Yesterday / Earlier, the items’ group, or one list.
filter'all' | 'unread' (model)'all'Two-way: the panel’s All / Unread switch.
hasMorebooleanfalseOlder notifications exist: scrolling within 80 px of the end, the Load more button or Page Down onto the last article emits loadMore.
loadingbooleanfalseMore are loading: the feed is aria-busy and no further loadMore fires.
widthnumber | string360Panel width.
localestring | undefined—Locale of the relative times (default the browser’s).
messagesPartial<OgeOverlayMessages>—Per-instance overrides of the notifications* messages (see Overlay configuration).

Methods 1

Name Type Description
markAllRead()() => voidMarks every notification read.

Events 4

Name Type Description
itemsChange / openedChange / filterChangemodel halvesThe banana halves of [(items)], [(opened)] and [(filter)].
loadMorevoidAppend older notifications to items (and clear hasMore at the end).
readChange{ item: OgeNotification; read: boolean }One notification was marked read or unread — tell the server.
dismissedOgeNotificationOne notification was dismissed (it is already out of items).

Types 7

Feed and announcements

Name Type Description
Keyboard and screen readersrole="feed"The list is a WAI-ARIA feed: each notification an article named by its title and described by its body, with aria-posinset / aria-setsize (−1 while hasMore); Page Down / Page Up move between articles, Ctrl+End / Ctrl+Home leave the feed; aria-busy while loading. Unread titles start with a visually hidden “Unread”, the bell says how many are unread, and new unread notifications are announced politely. The panel is the suite’s popover: Escape and an outside click close it and focus returns to the bell.

Vocabulary

Name Type Description
OgeNotificationinterfaceOne notification: id, title, body?, time (a Date, an ISO string or epoch ms — shown as a relative time, “5 minutes ago”), read?, group? (the section with grouping="group"), severity? (info, success, warning, danger: the mark’s colour).
OgeNotificationGrouping'day' | 'group' | 'none'How the list is sectioned.
OgeNotificationFilter'all' | 'unread'Which items the list shows.

Behavior building blocks (@oge-ui/behavior)

Name Type Description
ogeNotificationSections / OgeNotificationSection / OgeNotificationSectionOptions(items, { grouping?, filter?, now?, labels? }) => OgeNotificationSection[]The sections, newest first.
ogeUnreadCount / ogeMarkNotifications / ogeNotificationTimehelpersCount unread; mark all or some read / unread (a new array); a notification’s time as epoch ms.
ogeRelativeTime / ogeShouldLoadMore / ogeFeedKeyIntenthelpers“5 minutes ago” in the locale (Intl.RelativeTimeFormat); whether a scrolled list is near its end; the feed keys.

OgeTooltip

[ogeTooltip]

Properties 9

Name Type DefaultDescription
ogeTooltipstring | TemplateRef<OgeTooltipTemplateContext> (required)—Tooltip text, or a template for rich content (formatting, icons — never focusable controls: a tooltip is not interactive). Applied to any element — the host gets aria-describedby pointing at the panel while it is shown. An empty string disables it.
tooltipContextunknownundefinedValue handed to a template ogeTooltip as $implicit (let-user).
tooltipShowModeOgeTooltipShowMode'hover'What shows it: 'hover' (dwell + keyboard focus), 'focus', 'click' (activation toggles; blur and Escape hide it) or 'manual' (only open() / close() / toggle()).
tooltipArrowbooleanfalseDraws a callout arrow pointing at the trigger (shared geometry with the popover).
tooltipMaxWidthnumber | string | undefined—Maximum bubble width — px number or any CSS length; the stylesheet default is 280px.
tooltipPlacementOgePopupPlacement'top'Preferred side; flips and clamps against the viewport like every anchored panel.
tooltipShowDelaynumber | undefined—Hover dwell before showing, in ms. Falls back to tooltipShowDelayMs from the overlay config. Keyboard focus always shows immediately.
tooltipHideDelaynumber | undefined—Grace period after the pointer leaves, in ms; falls back to tooltipHideDelayMs.
tooltipDisabledbooleanfalseSuppresses the tooltip without removing the directive — hides an already open panel.

Methods 3

Template reference (exportAs: 'ogeTooltip')

Name Type Description
open(): voidvoidShows the tooltip now, whatever the show mode (no dwell).
close(): voidvoidHides the tooltip now.
toggle(): voidvoidShows a hidden tooltip, hides a visible one.

Types 2

Name Type Description
OgeTooltipShowMode'hover' | 'focus' | 'click' | 'manual'Which trigger interactions show the tooltip.
OgeTooltipTemplateContext<C>{ $implicit: C }Context of a template tooltip — tooltipContext.

OgeContextMenu

[ogeContextMenu]

Properties 6

Name Type DefaultDescription
ogeContextMenureadonly OgeMenuItem[] (required)—Items of the menu opened on right-click or Shift+F10. An empty array falls back to the native browser menu — unless a contextMenuOpening handler builds the items per target.
contextMenuTargetstring | undefined—CSS selector delegating the menu to matching elements inside the host (closest() from the clicked / focused element): one menu serves many rows. Requests outside every match keep the browser menu; the match becomes the anchor, the contextMenuOpening target and the focus-return point.
contextMenuPanelClassOgeClassValue | undefined—Extra classes on the menu panel (a design system’s own menu class).
contextMenuPanelAttributesOgeHtmlAttributes | undefined—Extra attributes on the menu panel. Filtered by ogeSafeAttributes: event handlers (on*), srcdoc, style, class, script URLs and the attributes the component sets itself are dropped (one dev-mode warning per key).
contextMenuAriaLabelstring | undefined—Accessible name of the menu.
contextMenuDisabledbooleanfalseLeaves the browser menu in charge without removing the directive.

Methods 3

Name Type Description
open(x: number, y: number): voidvoidOpens the menu at a viewport point through the same pipeline as a right-click (contextMenuOpening runs with event: null); with contextMenuTarget, the target is the match under the point. Reach it with #menu="ogeContextMenu".
open(event: MouseEvent): voidvoidOpens at a pointer event’s location (a keyboard-synthesized event anchors to the target) — e.g. a “More” button’s (click).
close(): voidvoidCloses the menu programmatically.

Events 4

Name Type Description
contextMenuOpeningOgeContextMenuOpeningEventCancelable, before every open (pointer, keyboard, open()): { target, items, cancel, event }. Assign items to build the menu for this target; cancel keeps it closed (and the browser menu suppressed).
contextMenuItemClickOgeMenuListItemClickEventAn item was activated — same payload as OgeMenuList. The menu closes afterwards and focus returns to the host.
contextMenuOpenedvoidThe menu opened at the pointer (or at the host for Shift+F10).
contextMenuClosedvoidThe menu closed — by selection, Escape, an outside click or a scroll.

Types 1

Name Type Description
OgeContextMenuOpeningEvent{ readonly target: Element; items: readonly OgeMenuItem[]; cancel: boolean; readonly event: Event | null }Payload of contextMenuOpening; shared with the React onOpening.

OgeMenuList

oge-menu-list

Properties 4

Name Type Description
itemsreadonly OgeMenuItem[] (required)Menu items, separators included.
menuIdstring | undefinedId of the role="menu" element; generated (oge-menu-N) when omitted.
ariaLabelstring | undefinedAccessible name of the menu.
itemTemplateTemplateRef<OgeMenuItemTemplateContext> | undefinedReplaces the default check+text item rendering (icons, badges…).

Methods 1

Name Type Description
focus(position: 'first' | 'last' = 'first'): voidvoidFocuses the menu container and activates the first/last enabled item.

Events 2

Name Type Description
itemClickOgeMenuListItemClickEventAn enabled item was activated (click, Enter or Space). Order: itemClick → item.action?.() → closeRequest — skipped when the row stays open (Space on a checkbox/radio row, or keepOpen). For checkbox/radio rows checked is the next state.
closeRequestOgeMenuCloseRequestEventThe menu asks its owner to close it; the owner handles focus. Tab does not preventDefault, so the browser keeps tabbing from the owner.

Types 10

Name Type Description
OgeMenuItem<T>{ text: string; value?: T; hint?; disabled?; visible?; cssClass?; type?: OgeMenuItemType; checked?; group?: string; keepOpen?: boolean; icon?; iconClass?; severity?; separator?; action?: () => void; url?; badge?; shortcut?; items?: readonly OgeMenuItem<T>[] }Canonical menu item of the suite. separator: true ignores every other field. type picks the row kind: 'checkbox' renders menuitemcheckbox and 'radio' menuitemradio, both with aria-checked from checked (a check mark / an accent dot); radios of one group render inside a role="group", and checking one unchecks the rest of the group (see applyMenuItemCheck). 'header' is a non-focusable caption that labels the rows after it — up to the next separator or header — as a role="group"; the arrow keys and type-ahead skip it. The menu never mutates checked: the item-click event carries the next state. Space toggles a checkbox/radio row without closing the menu (APG); keepOpen keeps the menu open on any activation. Without type the historical rule holds: a defined checked renders menuitemcheckbox. icon takes SVG path data and iconClass hooks an icon font — one row with either gives every row an icon column, so labels stay aligned. url renders the row as a real <a href> with role="menuitem" — keyboard activation clicks the link, so preventDefault() in itemClick hands navigation to a router exactly like a pointer click. badge renders a trailing counter pill; shortcut renders a right-aligned accelerator hint and is announced via aria-keyshortcuts (display only — the application owns the binding). items makes the row a submenu parent (trailing chevron, aria-haspopup="menu", aria-expanded): activation or ArrowRight opens a nested oge-menu-list, hover opens after a dwell, and checked/action/url are ignored on it.
OgeMenuItem.visible / cssClassboolean / stringvisible: false leaves a row out (no array filtering) — separators it strands are dropped, and event indexes count the rows shown. cssClass adds classes to one row. hint is the native tooltip, e.g. why a row is disabled; severity: 'danger' marks a destructive one.
OgeMenuItemType'normal' | 'checkbox' | 'radio' | 'header'Row kind of an OgeMenuItem: a command, a menuitemcheckbox, a menuitemradio (grouped by group) or a non-focusable section caption.
applyMenuItemCheck(items: readonly I[], target: OgeMenuItem) => readonly I[]Returns items with the activation of target applied — immutably and at any depth: a checkbox toggles, a radio becomes checked and every other radio of its group on the same level is unchecked. Untouched rows keep their references; pass the item the click event carried. Framework-free (@oge-ui/behavior), re-exported here.
ogeFromPrimeMenuItems(items: readonly OgePrimeMenuItem[]) => OgeMenuItem[]Moving from PrimeNG: converts MenuItem arrays, submenus included — label → text, command → action, an icon class → iconClass, routerLink (+ queryParams, fragment) → url (ogePrimeRouterLinkUrl), styleClass → cssClass, title / tooltip → hint, id → value; separator, disabled, visible, badge, shortcut stay. OgePrimeMenuItem is structural — no PrimeNG dependency. See the migration guide.
ogePrimeRouterLinkUrl(item: { routerLink?; queryParams?; fragment? }) => string | undefinedA PrimeNG routerLink with its queryParams and fragment as one URL — ['/users', 42] → /users/42. The menus render a real link from it; hand navigation to your router from the item-click event.
OgeMenuItemSeverity'normal' | 'danger'Destructive items render with the danger token.
OgeMenuListItemClickEvent{ item: OgeMenuItem; index: number; checked?: boolean; event: MouseEvent | KeyboardEvent }checked is the state the activation moves a checkbox/radio row to (undefined for plain rows). Index within the items input (separators included).
OgeMenuCloseRequestEvent{ reason: 'escape' | 'tab' | 'select' | 'back'; event: KeyboardEvent | MouseEvent }Why the menu wants to close. 'back' is a nested submenu returning to its parent item — absorbed by the parent menu, it never reaches the root owner; 'select' and 'tab' chain up so the owner still receives exactly one request.
OgeMenuItemTemplateContext{ $implicit: OgeMenuItem; index: number }Context of itemTemplate.

OgeAnchoredPanel

Properties 16

Members

Name Type DefaultDescription
panelIdstring—Unique id applied to the panel element (oge-popup-N) — wire to aria-controls.
isOpenSignal<boolean>—Open state.
positionSignal<OgeResolvedPopupPosition | null>—null until the first measure after open; hide the panel while null.

OgeAnchoredPanelOptions (constructor)

Name Type DefaultDescription
anchor() => HTMLElement | null—Anchor element getter (null while not rendered). Required.
panel() => HTMLElement | null—Panel element getter (null while closed). Required.
placement() => OgePopupPlacement'bottom-start'Reactive getter — read signals inside so the next update sees changes.
width() => number | 'anchor' | undefined—Fixed pixel value or 'anchor' to match the anchor width.
offset() => number | undefined4Main-axis gap between anchor and panel.
viewportPadding() => number | undefined8Minimum distance kept from viewport edges when clamping.
closeOnOutsidePointerDownbooleantrueClose on document pointerdown outside anchor+panel (capture phase, composedPath-aware).
closeOnEscapebooleantrueClose on Escape — stacked overlays only close the topmost.
restoreFocus() => void—Restores focus after closes caused by escape/select (only when focus would otherwise be orphaned).
onClosed(reason: OgePopupCloseReason) => void—Notified after every close with its reason.
anchorRect() => OgeRect | null—Virtual anchor rectangle used for positioning when it returns a rect — e.g. the pointer location of a context menu.
transientbooleanfalseTransient surfaces (tooltips) skip the Escape stack so an open tooltip never swallows the Escape meant for the popup underneath.
arrow() => boolean | undefined—When it returns true, every measure also resolves the callout-arrow geometry into position().arrow (resolvePopupArrow) — the popover and the tooltip render their arrow from it.

Methods 5

Name Type Description
open(): voidvoidOpens (SSR-safe no-op without window); pushes onto the open-panel stack, adds listeners, measures.
close(reason: OgePopupCloseReason = 'api'): voidvoidCloses, removes listeners, restores focus for escape/select, then calls onClosed(reason).
toggle(): voidvoidOpen ⇄ close.
updatePosition(): voidvoidRe-measures anchor/panel and recomputes the position (rAF-coalesced). Also runs automatically on scroll/resize/panel growth.
destroy(): voidvoidRemoves every listener and pending frame; call from the owner's DestroyRef.onDestroy.

Types 1

Name Type Description
OgePopupCloseReason'api' | 'outside' | 'escape' | 'select' | 'tab' | 'back'Why a panel closed.

OgePopup

oge-popup

Properties 7

Name Type DefaultDescription
panelOgeAnchoredPanel (required)—The anchored-panel model driving id, position and visibility.
adaptive'popup' | 'sheet' | 'fullscreen''popup'Presentation: anchored, a modal full-width bottom sheet, or a full-screen dialog — role="dialog" + aria-modal, titled, with a close button; the shared OgeAdaptiveSheetCore (@oge-ui/behavior) locks scroll, inerts the background, traps Tab, moves focus in (an element marked data-oge-sheet-focus first), restores it, follows visualViewport above the on-screen keyboard and dismisses on a backdrop tap or a swipe down the handle. Popup editors resolve it from their adaptiveMode.
adaptiveTitlestring''Dialog title while adaptive (editors pass their field label).
closeLabelstring''Aria label of the adaptive close button, from the owner's messages catalog.
panelClassOgeClassValue | undefined—Extra classes on the panel element, next to oge-popup.
panelAttributesOgeHtmlAttributes | undefined—Extra attributes on the panel element. Filtered by ogeSafeAttributes: event handlers (on*), srcdoc, style, class, script URLs and the attributes the component sets itself are dropped (one dev-mode warning per key).
[ogePopupSheetHeader] / [ogePopupSheetFooter]content attribute—Projected under the adaptive title (a search field) and pinned at the bottom (a Done action); render them only while adaptive.

Methods 2

Adaptive presentation helpers

Name Type Description
ogeAdaptivePresentation(mode, breakpoint, kind?): Signal<OgeAdaptivePresentation>Signal<OgeAdaptivePresentation>Injection-context helper every popup editor uses: 'popup' unless mode() is 'auto' and the viewport is narrower than breakpoint(), then kind ('sheet' default). Bind it to <oge-popup [adaptive]> in your own popup.
ogeAdaptiveViewport(breakpoint): Signal<boolean>Signal<boolean>Whether the viewport is narrower than breakpoint() — follows matchMedia crossings, false during SSR.

Types 1

Name Type Description
<oge-popup>componentPresentational chrome: fixed positioning, popup surface tokens, --oge-z-popup stacking, transparent (via opacity, so the subtree stays focusable) until the first measure. Projects arbitrary content.

resolvePopupPosition

Methods 1

Name Type Description
resolvePopupPosition(req: OgePopupPositionRequest): OgeResolvedPopupPositionOgeResolvedPopupPositionPure anchored-popup placement: preferred side with flip when the opposite side has more room, cross-axis alignment fallback, and a final clamp into the viewport. Coordinates are viewport-relative (position: fixed).

Types 17

OgePopupPositionRequest

Name Type DefaultDescription
anchorOgeRect—Anchor rectangle (viewport-relative). Required.
panel{ width: number; height: number }—Measured panel size. Required.
viewport{ width: number; height: number }—Viewport size. Required.
placementOgePopupPlacement—Preferred placement. Required.
offsetnumber4Gap between anchor and panel on the main axis.
viewportPaddingnumber8Minimum distance kept from viewport edges when clamping.
rtlbooleanfalseResolves logical start/end (and left/right sides) against RTL.

OgeResolvedPopupPosition

Name Type DefaultDescription
top / leftnumber—Viewport-relative — apply with position: fixed.
placementOgePopupPlacement—Logical placement actually used after flipping.
width?number—Panel width when anchor-width matching or a fixed width was requested (set by OgeAnchoredPanel, not by the pure function).
arrow?OgePopupArrow—Callout-arrow geometry { side, offset }, present when the anchored panel was asked for an arrow — the panel edge facing the anchor and the arrow centre along it, in px.

Callout arrow

Name Type DefaultDescription
resolvePopupArrow(req: OgePopupArrowRequest): OgePopupArrowOgePopupArrow—Pure arrow geometry shared by the popover and the tooltip in both layers: the arrow sits on the panel edge facing the anchor (RTL-aware) and points at the anchor centre, clamped edgePadding (default 12px) inside the edge so it never rides over a rounded corner after the viewport clamp shifted the panel.
OGE_POPUP_ARROW_SIZEnumber7How far the arrow tip reaches out of the edge; hosts add it to the panel offset while an arrow is shown.

Supporting types

Name Type DefaultDescription
OgePopupPlacement'bottom-start' | 'bottom-end' | 'top-start' | 'top-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end'—Side + cross-axis alignment.
OgePopupSide'top' | 'bottom' | 'left' | 'right'—Main-axis side.
OgePopupAlign'start' | 'end'—Cross-axis alignment.
OgeRect{ top: number; left: number; width: number; height: number }—Structurally compatible with DOMRect.

Overlay configuration

Methods 1

Name Type Description
provideOgeOverlayConfig(config: OgeOverlayConfigInput): ProviderProviderApplication- or component-scoped defaults.

Types 11

OgeOverlayConfig

Name Type DefaultDescription
offsetnumber4Gap between anchor and panel on the main axis.
viewportPaddingnumber8Minimum distance kept from viewport edges when clamping.
typeAheadMsnumber500Idle time after which the menu type-ahead buffer resets.
menuShowDelayMsnumber50Hover dwell time before a submenu parent row opens its submenu.
menuHideDelayMsnumber300Grace period before an open submenu closes after hovering a sibling row — the diagonal-pointer allowance.
tooltipShowDelayMs / tooltipHideDelayMsnumber400 / 100Hover dwell before a tooltip shows (focus shows immediately) and the grace period before it hides.
popoverShowDelayMs / popoverHideDelayMsnumber150 / 300Hover dwell before a showOn: 'hover' popover opens, and the grace period after the pointer left trigger and panel — long enough to travel across the gap into the panel.
toastPosition / toastDisplayTime / toastMaxVisible / toastProgressBar / toastCoalesceDuplicatesOgeToastPosition / number / number / boolean / boolean'bottom-end' / 4000 / 5 / false / falseToast defaults.
toastStackedbooleanfalseToast stack mode: each region collapses into a deck — the newest toast in front, two more peeking behind it — that expands into a list while the pointer or focus is in it (pausing every timer in it); toasts swipe away sideways (reason 'swipe'). The moves glide on transforms; reduced motion switches at once.
messagesOgeOverlayMessages—User-facing strings of the modal header buttons, the toast chrome, the popover, the action sheet and the command palette: modalClose, modalMaximize, modalRestore, toastClose, toastRegionLabel, toastCountBadge, popoverClose, the action sheet’s actionSheetCancel / actionSheetLabel and the palette’s commandPaletteLabel, commandPalettePlaceholder, commandPaletteEmpty, commandPaletteRecent and commandPaletteResults (an ICU plural over {count}), and the tour’s tourLabel, tourStep (Step {index} of {count}), tourNext, tourPrevious, tourSkip and tourDone, and the notification center’s notificationsLabel, notificationsBell (an ICU plural over the unread {count}), notificationsAll, notificationsUnread, notificationsMarkAllRead, notificationsMarkRead, notificationsMarkUnread, notificationsDismiss, notificationsToday, notificationsYesterday, notificationsEarlier, notificationsEmpty, notificationsLoading, notificationsLoadMore and notificationsNew (optional; English “Close”, “Cancel” and “Actions” when a catalog predates them).
messages — dialog helpers & windowOgeOverlayMessages (optional keys)—dialogOk ('OK'), dialogCancel ('Cancel'), dialogConfirmTitle ('Confirm'), dialogAlertTitle ('Notice'), dialogPromptTitle ('Enter a value'), dialogRequired ('This field is required.'), windowMinimize ('Minimize'), windowMoved ('Window moved to {x}, {y}'), windowResized ('Window resized to {width} by {height}'). Optional so existing catalogs keep type-checking; English fills the gaps.

Overlay primitives

Methods 9

Escape stack

Name Type Description
pushOverlay(surface: object): voidvoidRegisters a surface as the new topmost overlay. No-op if it is already in the stack.
removeOverlay(surface: object): voidvoidRemoves a surface from the stack; tolerates surfaces that were never pushed.
isTopOverlay(surface: object): booleanbooleanTrue only for the topmost surface. For Escape handling use claimOverlayEscape instead: it also makes sure one key press closes one layer.
claimOverlayEscape(event: Event, surface: object): booleanbooleanClaims an Escape key event for surface: true only when it is the topmost overlay and no surface acted on this event yet. Gate your own overlay’s Escape handler on it (after pushOverlay): every listener on document runs regardless of stopPropagation(), so with isTopOverlay alone the layer below the one that just closed would close in the same key press. Every OGE modal, drawer, popup, popover, menu and action sheet uses it, so app layers and OGE layers close one per Escape, top first.
isOverlayEscapeClaimed(event: Event): booleanbooleanWhether a surface already acted on this Escape event — for handlers outside the stack (a page-level shortcut) that must ignore an Escape an overlay consumed.

Focus trap

Name Type Description
getTabbableElements(root: HTMLElement): HTMLElement[]HTMLElement[]Tabbable descendants in DOM order. Recomputed per call rather than cached behind sentinel elements, so content added or removed after open is always accounted for.
trapTabKey(event, root, fallback): voidvoidWraps Tab and Shift+Tab inside root. With no tabbable descendants it focuses fallback, so focus can never escape a modal surface.

Scroll lock

Name Type Description
lockBodyScroll(): voidvoidLocks body scroll and compensates for the scrollbar width. Ref-counted, so nested surfaces cannot unlock each other.
unlockBodyScroll(): voidvoidReleases one reference; the last release restores the inline styles exactly as they were.

OgeModalHarness

Properties 1

Harness

Name Type Description
hostSelector'oge-modal'Static. The host selector the CDK loader matches — import from @oge-ui/overlay/testing; @angular/cdk is an optional peer only this entry needs.

Methods 12

Finding the modal

Name Type Description
with(filters?: OgeModalHarnessFilters)HarnessPredicate<OgeModalHarness>Static. Predicate for loader.getHarness(): selector, ancestor, title (string or RegExp) and open. Service-opened modals live in document.body: use TestbedHarnessEnvironment.documentRootLoader(fixture).

State

Name Type Description
isOpen()Promise<boolean>Whether the modal is open (its panel is rendered).
getTitle()Promise<string>The title — the heading’s text, or the aria-label of an untitled modal.
getRole()Promise<string | null>The panel's role: 'dialog' or 'alertdialog'.
isBusy()Promise<boolean>Whether the modal reports aria-busy.
getContentText()Promise<string>Text of the modal body (the projected content).

Actions

Name Type Description
getButtonTexts()Promise<string[]>Labels of the action buttons — the footer’s, or an alert / confirm / prompt dialog’s; text, or aria-label when empty.
clickButton(label: string | RegExp)Promise<void>Clicks the matching action button; throws with the button list when none matches.
close()Promise<void>Clicks the header’s close (✕) button — the full close pipeline runs.
pressEscape()Promise<void>Presses Escape inside the modal (closeOnEscape).
clickBackdrop()Promise<void>Presses on the backdrop outside the panel (closeOnBackdropClick).

Content container

Name Type Description
getHarness / getHarnessOrNull / getAllHarnesses / getChildLoaderContentContainerComponentHarnessSearch the open panel for other harnesses — the editors of a modal form are one call away.

Types 1

Name Type Description
OgeModalHarnessFiltersBaseHarnessFilters & { title?: string | RegExp; open?: boolean }Options of OgeModalHarness.with().

Notes

  • The overlay config's messages block is minimal — the anchored primitives render no user-facing strings (consumer components own their i18n); only the modal's and the toast's chrome labels live there.
  • Panels reposition (never detach) on capture-phase scroll and resize; a ResizeObserver on the panel handles async content growth.