darkroomengineering / lenis

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

Horizontal scroll is not working #209

Closed DaniAcu closed 11 months ago

DaniAcu commented 11 months ago

Describe the bug When you try to use lenis in a horizontal scrolled it doesn't work. I tried to use inside a section and as global scroll, but the wheel doen't have any effect.

To Reproduce Codesanbox: https://codesandbox.io/s/lenis-horizontal-scroll-gfcxq9?file=/index.html

scroll down with the wheel and nothing happens

rollakal commented 11 months ago

With using gestureOrientation: "both" its working. Don't know if it's intended to be like this. With a quick look every example seems to use this setting.

Checkout https://codesandbox.io/s/react-lenis-horizontal-scroll-wh50q7 @arzafran react example to get some informations.

clementroche commented 11 months ago

@DaniAcu please update lenis version, it works for me https://codesandbox.io/s/mp5ygx

DaniAcu commented 11 months ago

It doesn't work in your example. But the example of rollakal it works. I dont know why, but I will check it

DaniAcu commented 11 months ago

gestureOrientataion should be "both" to make it work.