ScreenInterpolationProps contains all the values you need to create custom screen animations. It’s passed to your screenStyleInterpolator function and provides access to progress values, screen states, layouts, and shared element bounds.
Type Definition
Screen States
Each screen in the stack has a state object containing animation values and metadata.Values for the screen being interpolated.This is the screen you’re defining animations for.
Values for the screen before the current one in the stack.
undefined if current screen is the first screen.Values for the screen after the current one in the stack.
undefined if current screen is the topmost screen.The screen state currently driving the transition.This is either
current or next, whichever is focused.The screen state NOT driving the transition.When focused, this is the previous screen. When not focused, this is the current screen.
ScreenTransitionState Properties
Each screen state contains these animated values:Animation progress for this screen.
0- Screen is fully off-screen (entering)1- Screen is fully visible (active)
Whether this screen is being dismissed.
0- Screen is opening or active1- Screen is closing/being dismissed
Whether this screen is entering.
0- Screen is closing or inactive1- Screen is opening/entering
Whether this screen is currently animating.
0- No animation in progress1- Animation or gesture is in progress
Live gesture values for this screen.Properties:
isDragging(number) - Whether user’s finger is on screen (0 or 1)x(number) - Horizontal translation in pixelsy(number) - Vertical translation in pixelsnormalizedX(number) - Horizontal translation normalized (-1 to 1)normalizedY(number) - Vertical translation normalized (-1 to 1)isDismissing(number) - Whether screen is being dismissed (0 or 1)direction(GestureDirection | null) - Initial direction that activated the gesture
Custom metadata passed from screen options.Use for conditional animation logic instead of checking route names.
The route object for this screen.Contains route name, params, and key.
Progress Values
Combined progress of current and next screen transitions, ranging from 0-2.
0- Screen is entering (off-screen)1- Screen is visible (active)2- Screen is exiting (being covered by next screen)
Accumulated progress from the current screen’s position onwards in the stack.Unlike
progress (0-2), this ranges from 0-N where N is the number of screens above the current screen. Each screen at index I sees stackProgress as the sum of all progress values from index I to the top of the stack.Falls back to progress when not in blank-stack.Animated index of the current snap point.Interpolates between indices during gestures/animations.
- Returns
-1if no snap points are defined - Returns
0when at or below first snap point - Returns fractional values between snap points (e.g.,
1.5= halfway between snap 1 and 2) - Returns
length-1when at or above last snap point
Whether the current screen is the focused (topmost) screen in the stack.Use this to apply different animations for the incoming vs outgoing screen.
Layout and Measurements
Layout measurements for the screen.Layout properties:
width(number) - Screen width in pixelsheight(number) - Screen height in pixels
Safe area insets for the screen.EdgeInsets properties:
top(number)right(number)bottom(number)left(number)
Function that provides access to bounds builders for shared element transitions.BoundsAccessor options:
id(string) - ThesharedBoundTagto matchmethod(“transform” | “size” | “content”) - How to animatespace(“relative” | “absolute”) - Coordinate spacescaleMode(“match” | “none” | “uniform”) - Aspect ratio handlingraw(boolean) - Return raw values
Deprecated Properties
Whether the active screen is currently transitioning.
Whether the active screen is being dismissed/closed.
Complete Examples
Slide from Bottom
Draggable Card with Scale
Conditional Animation with Meta
Stack Depth Effect
Related Types
- ScreenTransitionConfig - Configuration object that uses this type
- GestureValues - Gesture state properties
- BoundsAccessor - Shared element bounds function
