Overview
ScrollViews inside sheets create complex gesture scenarios. The library provides automatic coordination to ensure smooth interaction between scroll and navigation gestures.Basic ScrollView in Sheet
UseTransition.ScrollView for built-in gesture coordination:
Transition.ScrollView automatically handles gesture passing at scroll boundaries.
Scroll Boundary Behavior
At the top of the ScrollView (whenscrollY = 0), the gesture can transfer to the sheet:
- Scrolling down (anywhere): ScrollView scrolls normally
- At top, dragging up: Sheet expands to next snap point
- Below last snap point: Sheet snaps back up
- Dragging down: Scrolls or collapses sheet
Gesture Behavior Modes
Expand and Collapse (Default)
Users can expand the sheet by dragging up at the scroll boundary:Collapse Only
Users cannot expand via scroll—must use dead space:Dead Space for Expansion
Create header space outside the ScrollView for manual sheet expansion:FlatList Coordination
UseTransition.FlatList for lists with built-in coordination:
SectionList Coordination
SectionLists also support gesture coordination:Nested ScrollViews
Nested scrollable content requires explicit coordination:scrollEnabled={false} on inner scrollables to prevent conflicts.
Custom Scroll Coordination
For non-Transition ScrollViews, coordinate manually withuseSharedValue:
Handling Velocity at Boundary
Control snap point selection when releasing with velocity:ScrollView with Header
Add a fixed header above the scrollable content:Performance Optimization
Scroll Throttling
Limit scroll event frequency for better performance:Remove Scroll Indicators
Hide scrollbar for cleaner appearance:Memoize List Items
For large lists, memoize item components:Common Patterns
Expandable Sheet with Scroll
Sheet expands on demand, then allows scrolling:Static Header, Scrollable Body
Fixed header with content below:Pull-to-Refresh
Combine scroll with custom refresh logic:Troubleshooting
ScrollView Not Scrolling
Ensure ScrollView is not inside a View withflex: 1:
Gesture Not Transferring at Boundary
Check:- ScrollView is at top (scrollY = 0)
sheetScrollGestureBehavioris not “collapse-only”gestureEnabledis true
FlatList Items Not Rendering
Verify data and key extractor:Best Practices
- Use
Transition.ScrollViewfor automatic coordination - Set
scrollEventThrottleto reduce CPU usage - Memoize list items for large lists
- Test scroll + gesture together before shipping
- Provide visual feedback for scroll state
- Throttle expensive operations in scroll handler
Next Steps
- Learn gesture ownership for complex scenarios
- Explore snap points for sheet sizing
- See gestures for detailed configuration
