ScreenTransitionConfig is the core configuration type that defines how screens animate, respond to gestures, and behave during transitions. All three stack types (Blank Stack, Native Stack, and Component Stack) extend this type.
Type Definition
Properties
Animation Configuration
Function that calculates animated styles based on transition progress.Receives ScreenInterpolationProps and returns styles for screen elements.
Animation configurations for different transition types.
Gesture Configuration
Controls whether swipe-to-dismiss is enabled.For screens with
snapPoints, gesture-driven snapping between non-dismiss snap points remains available even when this is false.The direction(s) for the swipe gesture used to dismiss the screen.Values:
"horizontal"- Swipe left to dismiss"horizontal-inverted"- Swipe right to dismiss"vertical"- Swipe down to dismiss"vertical-inverted"- Swipe up to dismiss"bidirectional"- Any direction- Array of directions - Multiple directions (e.g.,
["horizontal", "vertical"])
How much the gesture’s final velocity impacts the dismiss decision.Higher values make the gesture more responsive to flicks.
How much velocity affects snap point targeting.Lower values make snapping feel more deliberate (iOS-like), higher values make it more responsive to flicks.
Distance threshold (in pixels) for gesture recognition throughout the screen.
Whether the gesture directly drives the animation progress.When
true, the screen follows your finger. When false, the gesture triggers an animation.The area of the screen where the gesture can be activated.Simple values:
"edge"- Only from screen edges"screen"- Anywhere on screen
Snap Points
Array of fractions (0-1) where the screen can rest.Each value represents a fraction of the screen dimension in the gesture direction.
The initial snap point index when the screen opens.
Controls whether swiping to expand works from within a ScrollView.
true(Apple Maps style): Swiping up at scroll top expands the sheetfalse(Instagram style): Expand only works via deadspace
Locks gesture-based snap movement to the current snap point.When enabled, users cannot gesture between snap points. Programmatic
snapTo() calls still work. If dismiss gestures are allowed (gestureEnabled !== false), swipe-to-dismiss still works.Backdrop Configuration
Controls how touches interact with the backdrop area (outside screen content).
"block"- Backdrop catches all touches (default)"passthrough"- Touches pass through to content behind"dismiss"- Tapping backdrop dismisses the screen"collapse"- Tapping backdrop collapses to next lower snap point, then dismisses
Custom component to render as the backdrop layer.When provided, replaces the default backdrop entirely — including press handling. You must handle dismissal inside your component using navigation methods.Use
useScreenAnimation() inside the component to access animation values.Overlay Configuration
Function that returns a React Element to display as a persistent overlay.The overlay animates with the stack and receives navigation state and progress values.
Whether to show the overlay.The overlay is shown by default when
overlay is provided. Set to false to hide it.Metadata
Custom metadata passed through to animation props.Use this for conditional animation logic instead of checking route names.
Experimental
Forces the display to run at maximum refresh rate during transitions.Prevents iOS/Android from throttling to 60fps. Useful for smoother animations on 90/120/144Hz displays.Note: Increases battery usage while active.
Usage Examples
Basic Transition
Bottom Sheet with Snap Points
Shared Element Transition
Stack-Specific Extensions
Each stack type extendsScreenTransitionConfig with additional options:
Blank Stack
Native Stack
Component Stack
Related Types
- ScreenInterpolationProps - Props passed to
screenStyleInterpolator - NavigationOptions - Stack-specific navigation options
