<overlay>
A layer above the whole page, like a modal <dialog>. Use it for dialogs and sheets: while it shows, the rest of the app gets no taps.
Usage
Import LYNX_ELEMENTS in your component (see Elements).
In the apps ng build --platform makes, an overlay covers the whole screen, as the page does. That's under the status bar, and under the navigation bar or home indicator. Pad its content with env(safe-area-inset-*) (see Safe area).
In your own Android app that draws edge to edge, XElement's overlay still stops above the navigation bar. Set android-adapt-edge-to-edge to change that. Only Android 15 and later read it.
Attributes
Plus the common attributes, such as id, class and style.
Events
Read the payload from $event.detail. Angular types $event for each event: see Element events.
Plus the common events, such as bindtap.
Children
Give the overlay one child: a view that fills the screen (width: 100%; height: 100%), such as a dimmed backdrop. Put your content inside that view.
The overlay takes no space itself. It sizes only its first child, against the screen, so a bare position: absolute first child collapses to the top-left corner.
Related
- Dialogs and overlays: when to use
<overlay>,LynxPortalor a UI component - LynxPortal: open an overlay from anywhere in the app
- Dialog, Sheet and Bottom Sheet: UI components built on it
