darkroomengineering / lenis

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

Remove or discourage smoothWheel option, or turn it off by default #397

Closed gregplaysguitar closed 1 month ago

gregplaysguitar commented 1 month ago

Describe the bug

All over the web I notice websites where two-fingered scrolling with a trackpad or wheel feels laggy because when you scroll a small distance but don't lift your fingers from the trackpad, the content continues to move. In most cases this seems to be due to the smoothWheel option being enabled in lenis (which I guess is a testament to the popularity of the library!)

From a UX perspective, while a user is actively scrolling, the content position should exactly match their movement. If the user "flicks" the content, and lifts their fingers, then scrolling should continue with momentum. This is exactly how MacOS works by default, but with smoothWheel on, there is always momentum, so it's not possible to accurately scroll a small distance with the trackpad.

I guess I must be missing the reason why others see this smoothWheel behaviour as desirable, but it always grates me, and others I've talked to. This is not meant to be snarky - I genuinely think the web would be better off with this functionality not available so I'm raising it here.

To Reproduce

Any lenis installation that doesn't explicitly disable smoothWheel

feledori commented 1 month ago

pretty based, but we will think about it. appreciate the feedback.

clementroche commented 1 month ago

i think what you describe would be a syncWheel that tries to looks as native scrolling behavior, you can try to use a greater lerp value to find the right feeling.

However it's currently almost impossible to imitate native scrolling due to variety of scrolling devices (mouse, trackpad, etc.) and the impossibility of detect such things using javascript.