Jump to content
Search Community

Animate Tailwind css theme change with gsap

Hautie test
Moderator Tag

Recommended Posts

There is any possibilities to animate changing themes in tailwind?

for example:
 

<div class="themeName absolute w-[75vw] h-auto mt-[15vw] right-0 select-none">
    <div class="z-1 absolute w-[35vw] h-auto inset-0">
      <img class="mouse" :src="'src/assets/images/' + backgroundCan + '.png'" alt="" parallax_value="20">
    </div>
</div>

How i can animate theme change? something like from black to pink
 

Link to comment
Share on other sites

Welcome to the forums, @Hautie. GSAP can animate any property of any object, and it does so by setting inline styles. You can animate backgroundColor, for example - that's super easy. 

 

You might want to check out the getting started guide -

 

I'm not familiar with tailwind, but if you need more GSAP-specific help, please provide a minimal demo and we'd be happy to take a peek. 

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