Jump to content
Search Community

Problem with Lenis + GSAP Scroll Trigger

dominz2005
Moderator Tag

Recommended Posts

dominz2005
Posted

I have a problem with implementing lenis with the scrollTrigger. Basically when I make the scroll trigger end to be "+=800px" lenis ends up unavailable to scroll to the bottom of the page.

 

 
        gsap.registerPlugin(ScrollTrigger);
 
        const lenis = new Lenis({
            lerp: 0.15,
            autoRaf: true,
        });
 
        ScrollTrigger.create({
            trigger: section.value.parentNode,
            start: "top 89px",
            end: `+=800px`,
            pin: section.value,
            markers: true
        })
GSAP Helper
Posted

Without a minimal demo, it's very difficult to troubleshoot; the issue could be caused by CSS, markup, a third party library, a 3rd party script, etc. Would you please provide a very simple CodePen or Stackblitz that illustrates the issue? 

 

Please don't include your whole project. Just some colored <div> elements and the GSAP code is best. See if you can recreate the issue with as few dependencies as possible. 

 

See the Pen aYYOdN by GreenSock (@GreenSock) on CodePen.

that loads all the plugins. Just click "fork" at the bottom right and make your minimal demo

 

By the way Lenis isn't a GreenSock product, so we can't really support that but since it controls scroll, you probably need to use scrollerProxy() to make sure it communicates properly with ScrollTrigger: 

https://gsap.com/docs/v3/Plugins/ScrollTrigger/static.scrollerProxy()

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...