invoker | public | HTMLElement | undefined | | The invokerNode | |
content | public | HTMLDialogElement | HTMLDivElement | | The contentWrapperNode | |
placementMode | public | 'global' | 'local' | undefined | | Determines the connection point in DOM (body vs next to invoker). | |
invokerNode | public | HTMLElement | undefined | | The interactive element (usually a button) invoking the dialog or tooltip | |
referenceNode | public | HTMLElement | | The element that is used to position the overlay content relative to. Usually,
this is the same element as invokerNode. Should only be provided when invokerNode should not
be positioned against. | |
contentNode | public | HTMLElement | | The most important element: the overlay itself | |
contentWrapperNode | public | HTMLElement | | The wrapper element of contentNode, used to supply inline positioning styles. When a Popper
arrow is needed, it acts as parent of the arrow node. Will be automatically created for global
and non projected contentNodes. Required when used in shadow dom mode or when Popper arrow is
supplied. Essential for allowing webcomponents to style their projected contentNodes | |
backdropNode | public | HTMLElement | | The element that is placed behind the contentNode. When not provided and `hasBackdrop` is true,
a backdropNode will be automatically created | |
elementToFocusAfterHide | public | HTMLElement | | The element that should be called `.focus()` on after dialog closes | |
hasBackdrop | public | boolean | | Whether it should have a backdrop (currently exclusive to globalOverlayController) | |
isBlocking | public | boolean | | Hides other overlays when mutiple are opened (currently exclusive to globalOverlayController) | |
preventsScroll | public | boolean | | Hides other overlays when mutiple are opened (currently exclusive to globalOverlayController) | |
trapsKeyboardFocus | public | boolean | | Rotates tab, implicitly set when 'isModal' | |
hidesOnEsc | public | boolean | | Hides the overlay when pressing [ esc ] | |
hidesOnOutsideClick | public | boolean | | Hides the overlay when clicking next to it, exluding invoker | |
hidesOnOutsideEsc | public | boolean | | Hides the overlay when pressing esc, even when contentNode has no focus | |
inheritsReferenceWidth | public | 'max' | 'full' | 'min' | 'none' | undefined | | Will align contentNode with referenceNode (invokerNode by default) for local overlays.
Usually needed for dropdowns. 'max' will prevent contentNode from exceeding width of
referenceNode, 'min' guarantees that contentNode will be at least as wide as referenceNode.
'full' will make sure that the invoker width always is the same. | |
handlesAccessibility | public | boolean | | For non `isTooltip`:
- sets aria-expanded="true/false" and aria-haspopup="true" on invokerNode
- sets aria-controls on invokerNode
- returns focus to invokerNode on hide
- sets focus to overlay content(?)
For `isTooltip`:
- sets role="tooltip" and aria-labelledby/aria-describedby on the content | |
isTooltip | public | boolean | | Has a totally different interaction- and accessibility pattern from all other overlays.
Will behave as role="tooltip" element instead of a role="dialog" element | |
invokerRelation | public | 'label' | 'description'| undefined | | By default, the tooltip content is a 'description' for the invoker (uses aria-describedby).
Setting this property to 'label' makes the content function as a label (via aria-labelledby) | |
popperConfig | public | PopperOptions | | Popper configuration. Will be used when placementMode is 'local' | |
viewportConfig | public | ViewportConfig | | Viewport configuration. Will be used when placementMode is 'global' | |
visibilityTriggerFunction | public | | | | |
_referenceNode | protected | HTMLElement | undefined | | | |
elevation | public | number | | | |
isShown | public | | | | |
hasActiveBackdrop | public | | | | |
hasActiveTrapsKeyboardFocus | public | | | | |
manager | public | | manager | | |
config | public | OverlayConfig | {} | | |
_defaultConfig | protected | OverlayConfig | { placementMode: undefined, contentNode: config.contentNode, contentWrapperNode: config.contentWrapperNode, invokerNode: config.invokerNode, backdropNode: config.backdropNode, referenceNode: undefined, elementToFocusAfterHide: config.invokerNode, inheritsReferenceWidth: 'none', hasBackdrop: false, isBlocking: false, preventsScroll: false, trapsKeyboardFocus: false, hidesOnEsc: false, hidesOnOutsideEsc: false, hidesOnOutsideClick: false, isTooltip: false, invokerRelation: 'description', visibilityTriggerFunction: undefined, handlesAccessibility: false, popperConfig: { placement: 'top', strategy: 'fixed', modifiers: [ { name: 'preventOverflow', enabled: true, options: { boundariesElement: 'viewport', padding: 8, // viewport-margin for shifting/sliding }, }, { name: 'flip', options: { boundariesElement: 'viewport', padding: 16, // viewport-margin for flipping }, }, { name: 'offset', enabled: true, options: { offset: [0, 8], // horizontal and vertical margin (distance between popper and referenceElement) }, }, { name: 'arrow', enabled: false, }, ], }, viewportConfig: { placement: 'center', }, zIndex: 9999, } | | |
_contentId | protected | | `overlay-content--${Math.random().toString(36).slice(2, 10)}` | | |