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
783 stars 74 forks source link

feat: adds prop to opt-out of scroll-locking #138

Closed eimerreis closed 9 months ago

eimerreis commented 9 months ago

Using the usePreventScroll hook leads to issues when using inputs within the sheet. The virtual keyboard of mobile devices will hide the actual input that is focused.

The scroll-locking behavior of react-modal-sheet is somewhat opinionated, which is probably fine for most use cases, but giving users the chance to opt-out of the scroll-locking behavior, will definitely increase the adoption of the library

fixes #135

Temzasse commented 9 months ago

Thanks @eimerreis! 🙏🏻 😊

Awesome addition! 👍🏻