Mental Model
An overlay is a floating layer owned by one screen in a navigator. It renders above that navigator's screens and stays mounted while its owner remains in the stack.
Configure it with the overlay and overlayShown screen options:
TSX
Overlays are scoped to their own navigator. They do not float into a parent, child, or sibling navigator.
The Overlay Stack
Screens and overlays have separate adjacency. If [] means that a screen owns an overlay, this screen stack:
TEXT
produces this overlay stack:
TEXT
Pushing B leaves A floating in place. Pushing C mounts C above A, and pushing E mounts E above C. Screens without overlays do not create gaps in the overlay transition order.
An overlay mounts once and keeps its component state until its owner leaves the navigation stack or overlayShown becomes false. The top overlay accepts touches. The overlay directly below it can remain visible for the transition, but it is inert; older overlays stay mounted and inactive.
Basic Example
TSX
Here, OverlayA remains above B. When C is pushed, OverlayC becomes active above OverlayA.
Animate the Overlay Stack
overlay is a reserved screenStyleInterpolator slot. The destination screen's interpolator drives the current adjacent overlay pair.
TSX
In A[] -> B -> C[], the overlay slot from C animates A out and C in. B is part of the screen stack, but not the overlay stack.
A screen does not need to own an overlay to drive the latest one. In A[] -> B, an overlay slot returned by B styles A. If B does not return the slot, A is left alone.
Do not use overlay as a custom styleId. It is a non-inheriting layer slot, like content and backdrop.
Owner State and Focused State
An overlay can outlive the moment when its owner was focused, so its props separate stable owner information from changing navigator information.
| Prop | Purpose |
|---|---|
route | Route that owns the overlay |
index | Owner route index |
focusedRoute | Currently presented route in this navigator |
focusedIndex | Currently presented route index |
routes | All routes in this navigator's stack |
meta | Metadata from the focused screen options |
options | Transition options from the focused screen |
navigation | Navigation object for the overlay owner's navigator |
progress | Stack progress relative to the overlay owner |
An undecided interactive dismissal keeps the current route focused. Once the dismissal commits, focusedRoute, focusedIndex, meta, and options switch to the screen underneath while the closing screen finishes animating. A cancelled gesture leaves them unchanged.
Animation and Style IDs Inside an Overlay
The floating host reuses the stores created by the owner screen. It does not build a second descriptor, options, gesture, or animation provider tree.
That keeps these APIs scoped to the route that owns the overlay:
TSX
Use the reserved interpolator overlay slot when the screen transition should move the overlay layer itself. Use useScreenAnimation() or a custom styleId when elements inside the overlay need their own motion.