Overview
Snap points allow screens to rest at multiple heights, creating bottom sheets, top sheets, or side sheets. The API works with any gesture direction, making it versatile for various UI patterns.Basic Configuration
Bottom Sheet
The most common use case - a sheet that slides up from the bottom:Side Sheet
Create a drawer-style sheet from the side:Top Sheet
A sheet that slides down from the top:Configuration Options
Array of fractions (0-1) where the sheet can rest. Values represent percentages of screen height (for vertical) or width (for horizontal).Example:
[0.5, 1] creates two stops at 50% and 100%.Index of the snap point where the screen initially appears. Use
0 for the first snap point, 1 for the second, etc.Locks gesture-based snap movement to the current snap point. When enabled, users cannot swipe between snap points (but programmatic
snapTo() still works). If dismiss gestures are allowed (gestureEnabled !== false), swipe-to-dismiss still functions.Controls backdrop touch handling:
"block": Backdrop catches all touches"passthrough": Touches pass through to content behind"dismiss": Tapping backdrop dismisses the screen"collapse": Tapping backdrop collapses to next lower snap point, then dismisses at minimum
Custom backdrop component. When provided, replaces the default backdrop entirely (including default tap behavior). You’re responsible for implementing dismiss/collapse actions.
backdropBehavior still controls container-level pointer events.Programmatic Control
Control snap points from anywhere in your component tree:snapTo() works even when gestureSnapLocked is true. The lock only affects gesture-driven snapping.Snap Index in Animations
The animatedsnapIndex is available in your screen interpolator:
Animated index of the current snap point:
- 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
Example: Fade Header Based on Snap Position
ScrollView Behavior
When usingTransition.ScrollView inside a snap-enabled sheet:
- expandViaScrollView: true
- expandViaScrollView: false
Apple Maps StyleAt scroll boundary:
- Swipe up → expands to next snap point
- Swipe down → collapses to previous snap point (or dismisses at min)
- Normal scroll behavior
Allow expansion from ScrollView at boundary. When
false, expand only works via deadspace (non-scrollable areas).Custom Backdrop
Create a custom backdrop with full control over appearance and behavior:Animation Specs
Customize snap animations separately from enter/exit transitions:- Expand
- Collapse
Animation configuration when expanding to a higher snap point.Uses lower intensity than
open because snap movements are typically smaller than full enter/exit transitions.Gesture Lock Behavior
Control whether users can swipe between snap points:- gestureSnapLocked: false
- gestureSnapLocked: true
Default Behavior
- Users can swipe between all snap points
- Swipe-to-dismiss works (if
gestureEnabled: true) - Programmatic
snapTo()works
Velocity Impact
Control how swipe velocity affects snap targeting:How much velocity affects snap point targeting:
- Lower values (0.05-0.1): More deliberate, iOS-like feel
- Higher values (0.2-0.5): More responsive to quick flicks
- Default of 0.1 provides a balanced feel
