Jump to content
Search Community

ScrollTrigger with React js

Ameen test
Moderator Tag

Recommended Posts

Hi @Ameen and welcome to the GreenSock forums!

 

We have a series of resources for users just starting with React:

Also we have these Getting Started live examples in Codesandbox:

 

Basic Setup - Toggle Animation:

https://codesandbox.io/s/gsap-scrolltrigger-react-zrp6su

Basic ScrollTrigger:

https://codesandbox.io/s/gsap-scrolltrigger-react-zrp6su

Club GreenSock bonus plugins:
https://codesandbox.io/s/gsap-react-setup-zvbntr

 

Finally we have this example that, although it covers routing, it has a route with the exact same example you're trying to emulate:

https://codesandbox.io/s/gsap-react-routing-x666fx?file=/src/views/Layers.js

Check the file Layers.js and let us know if you have more questions.

 

Happy Tweening!

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.
×
×
  • Create New...