Giter Site home page Giter Site logo

Comments (17)

clementroche avatar clementroche commented on June 28, 2024 2

it should, react-lenis gives you the lenis instance as ref or using useLenis so you just need to plug it then.

from lenis.

Rosinida avatar Rosinida commented on June 28, 2024 1

Hi @clementroche sure, just made a very simple codepen demo for you. – hope this helps!
https://codepen.io/rosinida/pen/BargMXG
Thanks Robin

from lenis.

clementroche avatar clementroche commented on June 28, 2024 1

It seems like the solution would be to emulate scroll snapping using JavaScript and that's something we want to avoid. So for the moment i would advice you to not use Lenis if you need CSS snap scroll.

from lenis.

clementroche avatar clementroche commented on June 28, 2024

Hi @Rosinida thank you for your feedback, can you provide a live demo (ideally on codepen or codesandbox) ?

from lenis.

Rosinida avatar Rosinida commented on June 28, 2024

Hi @clementroche.
Is there a workaround to define a minimum scroll distance?
(as long as the scroll snapping doesn't work yet)

from lenis.

clementroche avatar clementroche commented on June 28, 2024

What do you mean by minimum scroll distance ? You mean emulate CSS scroll snap ?

from lenis.

Rosinida avatar Rosinida commented on June 28, 2024

Yes. I would like to say: Each scroll should get the same scroll distance (for example 100vh)

from lenis.

harshilsharma63 avatar harshilsharma63 commented on June 28, 2024

Any update on this? I'm facing the same issue - Lenis smooth scroll and CSS snap scroll doesn't work together very well.

from lenis.

harshilsharma63 avatar harshilsharma63 commented on June 28, 2024

Thanks for the update.

from lenis.

liqueflies avatar liqueflies commented on June 28, 2024

Investigating: setting the wrapper and the content it will scroll but not interpolating with css easing of the snap.
I think this could be a neverending issue.

EDIT: Solving this to me is like solving and improving accessibility of those king of scroll hijacking where you have to wait before triggering another scroll. what a dream :D

from lenis.

drewbaker avatar drewbaker commented on June 28, 2024

It seems like the solution would be to emulate scroll snapping using JavaScript and that's something we want to avoid. So for the moment i would advice you to not use Lenis if you need CSS snap scroll.

So stoked to see this library... Really like the approach. Scroll Snap is certainly something we need a lot. Would you be open to a PR trying to implement this? Or is this just a "hard no" that you don't want us to even try?

from lenis.

clementroche avatar clementroche commented on June 28, 2024

Of course we're open to a PR !

from lenis.

drewbaker avatar drewbaker commented on June 28, 2024

Noting a possible solution to consider https://github.com/ocsal/scroll-snap

from lenis.

rsm0128 avatar rsm0128 commented on June 28, 2024

Hi @drewbaker, Here is a PR for scroll snapping. It emulates scroll snapping by using JavaScript.

from lenis.

clementroche avatar clementroche commented on June 28, 2024

Hey you can try https://github.com/funkhaus/lenis-scroll-snap

from lenis.

sushanyadav avatar sushanyadav commented on June 28, 2024

Hey you can try https://github.com/funkhaus/lenis-scroll-snap

Is this available for react wrapper. if so how do we use it? Thank you so much.

from lenis.

sushanyadav avatar sushanyadav commented on June 28, 2024

It would be greatly appreciated if somebody could include a sandbox for this. 🙏

from lenis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.