Overview
Gestures transform animations from predefined sequences into interactive experiences. Users can drag screens to control progress, snap to intermediate points, and drive animations in real-time.Basic Gesture Setup
Enable gestures on a stack with these props:- Move between snap points (if configured)
- Dismiss the screen (progress 1–2)
- Interact naturally with the transition
Gesture Options
| Option | Type | Default | Description |
|---|---|---|---|
gestureEnabled | boolean | false | Enable gesture interaction |
gestureDirection | ”horizontal” | “vertical" | "horizontal” | Drag axis |
gestureActivationArea | object | screen bounds | Area where gesture starts |
gestureResponseDistance | object | 25 | Distance to activate gesture |
gestureVelocityImpact | number | 0.3 | Velocity influence on progress |
gestureDrivesProgress | boolean | true | Drag affects animation progress |
snapVelocityImpact | number | 0.1 | Velocity influence on snap point selection |
gestureSnapLocked | boolean | false | Lock to snap points (no intermediate states) |
gestureReleaseVelocityScale | number | 1 | Multiplier for release velocity |
gestureReleaseVelocityMax | number | Infinity | Cap for release velocity (px/s) |
backdropBehavior | ”static” | “interactive" | "static” | Tap backdrop to dismiss |
backdropComponent | React.Component | View | Custom backdrop renderer |
sheetScrollGestureBehavior | ”expand-and-collapse” | “collapse-only" | "expand-and-collapse” | Sheet scroll boundary behavior |
Gesture Activation Area
Define where gestures can start:Gesture Response Distance
How far a user must drag before the gesture activates:Velocity-Based Release
When the user releases the gesture, the gesture’s velocity influences animation:Interactive Backdrop
Allow users to dismiss by tapping the backdrop:Sheet Scroll Gesture Behavior
When a sheet contains a ScrollView, define how scrolling at boundaries works:Expand and Collapse
With"expand-and-collapse", scrolling at the top of the sheet can expand it:
Collapse Only
With"collapse-only", the sheet can’t expand via scroll. Users must use dead space (area without scrollable content):
Snap-Locked Gestures
Force gestures to snap to defined points instead of resting at intermediate positions:Ancestor Targeting
Control which navigator level handles the gesture using ancestor targeting:useScreenAnimation():
Manual Gesture Control
Use theuseScreenGesture hook to set gesture options programmatically:
Gesture Ownership
In nested navigators, gestures are claimed per direction. See Gesture Ownership for detailed information on how ownership works and resolves conflicts. Key principles:- Per-direction ownership: Each axis direction (horizontal, vertical) has one owner
- Child shadows parent: A child navigator’s gesture shadows the parent’s on the same axis
- Snap point claims: Snap points claim ownership of their axis
- ScrollView coordination: Scroll gestures yield to navigator gestures at boundaries
Simultaneous Gestures
Coordinate multiple gestures withsimultaneousWithExternalGesture:
Gesture Combinations
Example: A sheet with all gesture features enabled:- Drag to any snap point
- Swipe with velocity to overshoot or undershoot
- Scroll content and expand the sheet at the top
- Tap the backdrop to dismiss
Troubleshooting
Gesture Not Activating
Check these in order:gestureEnabledis truegestureResponseDistanceisn’t too largegestureActivationAreaincludes your touch point- Parent navigator isn’t shadowing the gesture (see Gesture Ownership)
Gesture Conflicts with Scroll
If ScrollView scroll and navigator gesture both respond, usesheetScrollGestureBehavior to define boundaries:
Release Velocity Too Aggressive
Reduce the multiplier:Next Steps
- Learn gesture ownership for multi-navigator coordination
- Explore snap points for gesture targets
- See ScrollViews for scroll gesture coordination
