Temzasse / react-modal-sheet

Flexible bottom sheet component built with Framer Motion to provide buttery smooth UX while keeping accessibility in mind 🪐
https://temzasse.github.io/react-modal-sheet/
MIT License
815 stars 77 forks source link

Request: Close Sheet by dragging anywhere on the Container #5

Closed fairhat closed 3 years ago

fairhat commented 3 years ago

Hey, thanks for the SSR update!

Is it possible to add this too? Or expose some props to implement it myself?

Temzasse commented 3 years ago

I guess it would be possible to make the whole sheet draggable but there are some caveats to that:

If there is a way to implement this kind of draggability without breaking other tap/gesture based interactions I will definitely include it in the library.

Do you have some idea how this could be solved? I remember trying to figure this issue out when I initially created this lib but could not figure out a solution 😕

Temzasse commented 3 years ago

I decided to test if Framer Motion had updated it's way of handling gestures/taps inside draggable targets and it seems that nowadays it's possible to make the whole container draggable 🎉 (or maybe I just messed this up initially somehow 🙈)

I will test this is a bit more and add it to the lib if everything works OK.

Temzasse commented 3 years ago

@fairhat I added this feature to 1.1.0. Please try it out and report any related issues 🙏

fairhat commented 3 years ago

works, thx!

Mr-Fullstack commented 2 years ago

can't get this working, this still works, would you have an example? please