rgommezz / react-native-scroll-bottom-sheet

Cross platform scrollable bottom sheet with virtualisation support, native animations at 60 FPS and fully implemented in JS land :fire:
MIT License
1.54k stars 64 forks source link

How to set the drag in px for the user to close or open the drawer #59

Closed saransh-malik closed 3 years ago

saransh-malik commented 3 years ago

Current Behavior

I have the drawer set up but if user doesn't drag the set amount of pixels, it goes back to last snap point. Basically if the user is not doing the drag gesture at set velocity and area we bring back the drawer to the last snap point.

Expected Behavior

Is there a way for us to set the velocity and area a user should drag in order to open/close the drawer? Like for instance I want that the user with even small flick should be able to open/close the drawer. Is there a way to set that up?

How to reproduce

Just use any drawer and do the flick/drag gesture at slow speed or in very less area.

Your Environment

version
Platform (Android, iOS or both)
react-native-scroll-bottom-sheet 0.7.0
react-native 0.63.1
react-native-gesture-handler 1.6.1
react-native-reanimated 1.9.0
rgommezz commented 3 years ago

You can use friction prop for that.