Jump to content
GreenSock

sagar_dev

Locomotive Scroll disables GSAPs scroll Trigger.

Recommended Posts

Hello, I was building entire multi page website with using GSAP only in Next.js for scroll trigger on every page for some elements. At, last I decided to also add locomotive scroll as well. But after adding it to the project all scroll trigger doesn't work at any page. Why is that I cannot find the answer. Also is there any method to achieve smooth scroll without disabling scroll trigger. 

 

Thank You !

Link to comment
Share on other sites

I've never used locomotive scroll and you are free to use what ever plugin you like, but GSAP has its own smooth scroll plugin, aptly named SmoothScroll, which is build for GSAP/ScrollTrigger, so this will probably save you a lot of headache instead of having to implement a third party smooth scroll library by using a tool that was build with ScrollTrigger in mind. 

 

As stated before Locomotive scroll is a third party library and we like to focus these forums to GSAP related questions, so if you insist on using these tools you'll be beter off asking the question on the support pages of the tool in question.

 

You'll could of course press your luck and post a minimal demo, maybe someone here has Locomotive scroll knowledge, but then it is kinda hard to debug something without a way to dive in to the code. So a minimal demo would really help.

 

Quote

If you're using something like React/Next/Nuxt/Gatsby or some other framework, you may find CodeSandbox easier to use. 

 

Hope it helps and happy tweening! 

  • Like 3
Link to comment
Share on other sites

1 hour ago, sagar_dev said:

At, last I decided to also add locomotive scroll as well. But after adding it to the project all scroll trigger doesn't work at any page. Why is that I cannot find the answer. Also is there any method to achieve smooth scroll without disabling scroll trigger.


For the use of ScrollTrigger alongside a third party smooth-scrolling library, have a look at .scrollerProxy()

 

That linked docs page also contains an examplar setup with locomotive-scroll. But as Mitchel already mentioned; Since locomotive-scroll is not a GreenSock product, you shouldn't expect too much support for it in these forums.

 

See the Pen zYrELYe by GreenSock (@GreenSock) on CodePen

 

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

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.
×