Mental Model
screenStyleInterpolator returns a keyed style map. Some keys target screen-container layers. Everything else targets transition-aware elements inside the screen tree.
The layer keys are:
overlaybackdropcontentsurfaceNAVIGATION_MASK_CONTAINER_STYLE_IDNAVIGATION_MASK_ELEMENT_STYLE_ID
Any other key is treated as an element target and matched against a styleId on a transition-aware component such as Transition.View or Transition.Pressable.
Layer Map
TSX
Each slot also supports shorthand style-only output:
TSX
Render Order
Most layers render inside screen-container in this order:
backdropcontent- optional navigation mask wrapper when
navigationMaskEnabledis enabled - deprecated optional surface wrapper when
surfaceComponentis provided - screen children and any matching
styleIdtargets
overlay is resolved separately by the floating overlay host above the navigator's screen containers. It drives the adjacent pair in the overlay stack rather than the normal screen stack.
That gives you two levels of control:
- screen-level layers for the overall container structure
- the floating overlay layer for persistent stack-relative UI
- element-level targets for individual transition-aware components inside the screen
overlay
overlay controls the floating overlay transition for the destination screen.
TSX
Overlay adjacency is sparse. Given A[] -> B -> C[], the overlay slot returned by C animates A and C as the adjacent pair. A plain screen may also return this slot to animate the latest overlay without owning one itself.
overlay does not inherit into nested transition scopes and must not be reused as a custom styleId. See Overlays for the complete ownership and lifecycle contract.
backdrop
backdrop controls the full-screen layer behind the active screen content.
TSX
If you provide backdropComponent, pass either a component type or a render-style function component.
TSX
Function components receive the layer values directly:
TSX
The render props are:
styles: the base backdrop style plus animated styles from thebackdropslotprops: animated props from thebackdropslotpointerEvents: the backdrop pointer-event state
Use backdrop for dimming, blur intensity, tint, or any visual treatment outside the screen itself. backdropBehavior still controls how taps are handled.
content
content targets the root animated container for the screen itself.
TSX
This is the slot that usually carries the main screen motion: translate, scale, opacity, rotation, and overall clipping styles.
Use contentComponent when the content layer itself needs a custom shell component.
TSX
The render props are:
styles: the base content style plus animated styles from thecontentslotprops: animated props from thecontentslotpointerEvents: the content pointer-event statechildren: the screen subtree
Use contentComponent for custom tray shells, rounded containers, glass panels, or other screen-level wrappers that should own the screen subtree.
surface
surface targets the optional wrapper created by surfaceComponent.
surfaceComponent is deprecated. It still works for compatibility, but new custom shells should use contentComponent instead.
TSX
Use surface only for older code that still relies on surfaceComponent. For new code, put the custom shell in contentComponent and drive it with the content slot.
Element Targets
Any non-layer key is routed to transition-aware elements inside the screen tree.
TSX
These keys apply only to transition-aware components created by the library such as Transition.View, Transition.Pressable, Transition.ScrollView, and Transition.FlatList.
Navigation Mask Layers
When navigationMaskEnabled is enabled and @react-native-masked-view/masked-view is installed, the content layer is wrapped in a masked container.
Two exported reserved ids control that wrapper:
NAVIGATION_MASK_CONTAINER_STYLE_IDNAVIGATION_MASK_ELEMENT_STYLE_ID
Use them directly in the interpolator:
TSX
NAVIGATION_MASK_CONTAINER_STYLE_ID styles the masked content container. NAVIGATION_MASK_ELEMENT_STYLE_ID styles the mask element itself.
Treat both ids as reserved layer keys. Do not reuse them as custom styleId values.
Props vs Style
Every slot supports both animated styles and animated props:
TSX
Use style for visual layout and transforms. Use props only when the wrapped layer or target component exposes animatable props such as blur intensity.