Quartz Headless docs/OverlayService

Search documentation

Type to search the documentation.

API: Core

OverlayService

Service reference for OverlayService.

Overview

Public methods

create

create(templateRef: TemplateRef<unknown>, viewContainerRef: ViewContainerRef, anchor: OverlayAnchor, config?: Partial<OverlayConfig>): OverlayRef

Creates an OverlayRef for a given anchor element or virtual coordinate anchor and template. Call .open() / .close() / .toggle() on the returned ref.

Safe to call during SSR: the overlay is not attached to the DOM until the browser environment is available.

Parameter Type Optional Description
templateRef TemplateRef<unknown>
viewContainerRef ViewContainerRef
anchor OverlayAnchor
config Partial<OverlayConfig> Yes

createAt

createAt(templateRef: TemplateRef<unknown>, viewContainerRef: ViewContainerRef, anchor: OverlayVirtualAnchor, config?: Partial<OverlayConfig>): OverlayRef

Convenience helper for context menus and pointer-driven popovers. Coordinates are viewport-relative, matching MouseEvent.clientX/clientY.

Parameter Type Optional Description
templateRef TemplateRef<unknown>
viewContainerRef ViewContainerRef
anchor OverlayVirtualAnchor
config Partial<OverlayConfig> Yes