Overview
Gestures allow users to dismiss screens by swiping in any direction. The library provides fine-grained control over gesture activation, response distance, and velocity handling.Basic Configuration
Enable swipe-to-dismiss with two properties:Gesture Direction
Control which swipe directions trigger dismissal:Configuration Options
Enable swipe-to-dismiss gestures. For screens with snap points, setting this to
false only blocks dismiss-to-0; snapping between non-dismiss points remains available.Direction(s) for swipe gesture. Can be a single direction or an array of directions.
Where the gesture can start. Use
"edge" for edge-only activation or "screen" for anywhere. Can also be configured per-side.Pixel threshold that must be exceeded for the gesture to activate throughout the screen.
How much the final swipe velocity affects the dismiss decision. Higher values make quick swipes more likely to dismiss.
Whether the gesture directly controls animation progress. Set to
false for gestures that only trigger dismissal without driving the animation.How much velocity affects snap point targeting. Lower values (iOS-like) make snapping more deliberate; higher values make it more responsive to flicks.
Gesture Activation Area
Simple Configuration
Per-Side Configuration
Configure different activation areas for each edge:Per-side configuration is useful for creating iOS-style back gestures (left edge only) while allowing full-screen swipes in other directions.
Working with ScrollViews
Use transition-aware scrollable components to ensure gestures work correctly:Available Components
Scroll Gesture Rules
Gestures activate based on scroll position and direction:- Vertical
- Vertical Inverted
- Horizontal
Direction:
"vertical" (swipe down to dismiss)- Only activates when scrolled to top
- Prevents conflicts with scroll-up gesture
Expand Via ScrollView
For screens with snap points, control whether scrolling at the boundary can expand the sheet:true: Apple Maps style - swiping up at scroll top expands the sheetfalse: Instagram style - expand only works via deadspace (non-scrollable areas)
Advanced Gesture Control
Custom Gesture Coordination
Coordinate your own pan gestures with the navigation gesture:Use
useScreenGesture() when you have custom pan gestures that need to work alongside screen dismiss gestures.Accessing Gesture Values
Gesture state is available in your interpolator:Gesture Values API
Whether the user’s finger is on the screen:
0 (no) or 1 (yes)Live horizontal translation of the gesture in pixels
Live vertical translation of the gesture in pixels
Normalized horizontal translation from
-1 (left) to 1 (right)Normalized vertical translation from
-1 (up) to 1 (down)Whether the screen is being dismissed:
0 (no) or 1 (yes)Initial direction that activated the gesture:
"horizontal", "horizontal-inverted", "vertical", "vertical-inverted", or nullExamples
Multi-Directional Draggable Card
From theDraggableCard preset:
Elastic Card with Backdrop
From theElasticCard preset:
Backdrop Behavior
Control how touches interact with the backdrop area:"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
backdropBehavior works independently of gesture configuration. You can have tap-to-dismiss without swipe gestures, or vice versa.