Comments (17)
it should, react-lenis gives you the lenis instance as ref or using useLenis so you just need to plug it then.
from lenis.
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.
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.
Hi @Rosinida thank you for your feedback, can you provide a live demo (ideally on codepen or codesandbox) ?
from lenis.
Hi @clementroche.
Is there a workaround to define a minimum scroll distance?
(as long as the scroll snapping doesn't work yet)
from lenis.
What do you mean by minimum scroll distance ? You mean emulate CSS scroll snap ?
from lenis.
Yes. I would like to say: Each scroll should get the same scroll distance (for example 100vh)
from lenis.
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.
Thanks for the update.
from lenis.
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.
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.
Of course we're open to a PR !
from lenis.
Noting a possible solution to consider https://github.com/ocsal/scroll-snap
from lenis.
Hi @drewbaker, Here is a PR for scroll snapping. It emulates scroll snapping by using JavaScript.
from lenis.
Hey you can try https://github.com/funkhaus/lenis-scroll-snap
from lenis.
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.
It would be greatly appreciated if somebody could include a sandbox for this. 🙏
from lenis.
Related Issues (20)
- Skipping/jumping when scrolling with Trackpad in Safari HOT 2
- How to hide Lenis.js from Wappalyzer HOT 3
- Title: How can I make the browser UI auto-hide with smooth touch enabled ? HOT 4
- Page not scrolling all the way HOT 1
- pull-to-refresh on mobile jumps HOT 1
- Page Not Scrolling All The Way After Navigating To Third Page HOT 8
- Lenis stop scroll smooth hovering images in safari HOT 3
- Uncaught ReferenceError: smooth is not defined HOT 17
- Horizontal scroll is not working HOT 4
- Jitter and frame dropping HOT 2
- Unable to scroll HOT 3
- Slow Scroll on 2 in 1 tablet HOT 1
- Remove Wyre Example HOT 1
- HTML scroll behavior smooth - breaks lenis HOT 4
- scrollTo blocks scrolling on Safari HOT 8
- Next 13.4 - Build error if `lenis` instance is exported HOT 1
- Scroll in desktop Safari and Firefox is broken HOT 1
- Smooth is not defined HOT 3
- Problems with latest version 1.0.22 HOT 2
- Issue with Finsweet TOC attributes in Webflow HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lenis.