Jump to content
GreenSock

pietdasilva

change background color between react components

Recommended Posts

hi friends, is there a way to gradually change the colors of let's say, the background, like the code above, but not between sections of the same html but between react components, i'm trying to do it through the main app.js with scrolltrigger, but i think im missing something

See the Pen d3c666ab441f15a8ea0da4a57535ea49 by akapowl (@akapowl) on CodePen

Link to comment
Share on other sites

I mean, React components are just HTML. Exactly the same rules apply! The main part that's more complicated is whether the child elements are rendered yet. 😬

I'd suggest reading this guide if you need a starting point!
 


Pop back with a React demo of what you've tried if you need more help.

Link to comment
Share on other sites

hi Cassie, thanks for answering. here's the thing, i was intending to do this effect between react components, not inside some div element. is there a way?

Link to comment
Share on other sites

Yep. And as I mentioned - React components are just HTML elements - the same rules apply.

Please provide a demo of what you've tried if you need any more help!

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