Skip to content

Connected Overlay

Overlay

A shared connected overlay primitive that encapsulates CDK overlay setup, positioning, width syncing, outside-click close, and Escape key close.

atlas-connected-overlay

Examples

Anchored panel

The low-level primitive under Select, Popover and Combobox: a panel positioned next to an origin element. It closes on an outside click or Escape by emitting closed ; the trigger reports its state with aria-expanded . matchOriginWidth is off here because the panel has its own width.

Above, as wide as the origin

preferredPosition="above" opens the panel over its origin (flipping below when there is no room) and matchOriginWidth (the default) gives it the origin's width. offsetY sets the gap.

API

Generated from the library source, so it always matches the code.

AtlasConnectedOverlayComponent atlas-connected-overlay

InputTypeDefaultDescription
origin requiredHTMLElement— The origin element to position the overlay relative to.
open booleanfalse Whether the overlay is currently open.
matchOriginWidth booleantrue Whether the overlay width should match the origin element width.
panelClass string'' CSS class(es) to apply to the overlay panel.
preferredPosition 'below' | 'above''below' Position preference: 'below' (default) tries below first, 'above' tries above first.
customPositions ConnectedPosition[] | undefinedundefined Custom CDK connected positions. When provided, overrides preferredPosition/offsetY.
offsetY number4 Y offset in pixels from the origin edge.
growAfterOpen booleanfalse Whether the overlay may grow after it opens. When true , CDK keeps the first position whose origin point is on-screen and lets the panel grow (even past the viewport) rather than re-flipping — useful for panels whose height changes while open, such as the datepicker switching months. When false (the default), CDK measures the panel's full height up front and flips to the first position where it fits completely. This is what fixed-height dropdowns (select, multi-select, combobox) want: a panel opened near the bottom edge flips above instead of growing off-screen downward.
OutputPayloadDescription
closedvoid Emits when the overlay should close (outside click or Escape).