darkroomengineering / lenis

How smooth scroll should be
https://lenis.darkroom.engineering
MIT License
7.37k stars 317 forks source link

Support for `data-lenis-prevent-wheel` and `data-lenis-prevent-touch` #186

Closed baptistebriel closed 1 year ago

baptistebriel commented 1 year ago

Hey there!

We're working on a new project that use Lenis under the hood. 🧈 We're currently seeing a use case where we'd like to disable Lenis on a specific element, but only for touch devices: we have a draggable card component on the page and it's conflicting with the touch events.

Idea of this PR is to add support for both data-lenis-prevent-wheel and data-lenis-prevent-touch, additional to the global data-lenis-prevent that will block both.

Let me know if there's anything I need to do for the build/package version? 👀 Would love to see this feature shipped on Lenis.

Cheers!

vercel[bot] commented 1 year ago

@baptistebriel is attempting to deploy a commit to the Studio Freight Team on Vercel.

A member of the Team first needs to authorize it.