Smooth scroll in Webflow

Hello everyone. Does anyone know what is the best way to implement smooth scroll in Webflow? I watched Timothy's tutorial for Lenis.js, but I see that people are having issues with Safari, anchor links sometimes returning to the top of the page, etc. It's also a bit irritating when scrolling and then while the scrollbar is moving, if we grab it with the mouse, the whole page starts glitching and bugs out for a few seconds. Is there any alternative or solution for these problems?
2 Replies
Web Bae
Web Bae3mo ago
hey @infernus most sites I see use Lenis. I'm not familiar enough with it to give workaround for the issues you mentioned though 😦 you might try asking in the github issues. can you send some examples of glitches people are experiencing? GSAP has a smooth scroll library but I believe it's a paid plugin
infernus
infernus3mo ago
I believe the GSAP smooth library is not compatible with Webflow, either due to sticky elements or Webflow interactions; I'm not sure which. The problem with anchor links is that when you click on one and scroll to the corresponding section, the page instantly returns to the top. I fixed this issue with a small piece of code I found on YouTube from someone named Diego Toda or something similar. However, the problem with the page glitching remains. It occurs when you scroll and then immediately grab the scrollbar with the mouse and move it up or down. Examples of pages with this issue: https://yuga.com/ https://yuga.com/ Is this a significant problem? What are the chances that someone will scroll and then immediately grab the scrollbar with their mouse?
Welcome to Yuga Labs, Home of BAYC, MAYC, Otherside, Cryptopunks, a...
Powered by ApeCoin and shaping web3 through storytelling, experiences, and community. From the creators of Bored Ape Yacht Club.
Want results from more Discord servers?
Add your server