Jump to content
Search Community

Background Box Scale Animation

Matheus Dias test
Moderator Tag

Recommended Posts

Well, I wan't to make an animation that changes the text color/background with a "box scale reveal". I made a simple video on Figma to show what i'm trying to produce:

https://streamable.com/zibc8n

 

I made a simple pen to that, but it only fades the background for now. I'm not sure how do to it or even if it's possible. Any help is appreciated

See the Pen VweRYWa by Maath (@Maath) on CodePen

Link to comment
Share on other sites

Hey Mattheus. There are a lot of ways to achieve that effect:

  • You could use HTML and CSS - Have two versions overlayed, the top one with overflow: hidden and then animate its width.
  • You could use SVG clip paths - Again have two versions (though in SVG), apply a clip path to the top one, then animate the clip path to reveal it.

There are others as well as variations of the above but I won't bore you as those are probably your two best approaches depending on what you're more comfortable with and what your needs are.

 

Let us know if you have specific questions, especially related to GSAP :) 

  • Like 2
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...