Loading video...

Video Failed to Load

Go Home

๐Ÿ’™ Easy GSAP animation in React with useGSAP() useGSAP() automatically handles animation cleanup and more, so that you can just focus on the fun stuff. ๐Ÿค˜๐Ÿป To learn more, head over to

50,241 views โ€ข 2 years ago โ€ขvia X (Twitter)

9 Comments

GSAP's profile picture
GSAP2 years ago

Longer video explainer here -

Parth ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ปโšก | DEV's profile picture
Parth ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ปโšก | DEV2 years ago

The new docs and the new hooks are just super nice!

GSAP's profile picture
GSAP2 years ago

๐Ÿ™๐Ÿป

object's profile picture
object2 years ago

Where vue ?

GSAP's profile picture
GSAP2 years ago

@philipbr12 Vue doesn't need it, this hook is necessary because of a few React specific pain-points. If you want to do animation cleanup in vue you can use gsap.context() There's a breakdown in the framework section of our docs.

isaac's profile picture
isaac2 years ago

Lovely. Been waiting for the React docs. Guess I have plans for the weekend๐Ÿ’š

^'s profile picture
^2 years ago

this is huge. honestly ๐Ÿ™๐Ÿฟ. phew. reading doc right away

Yinka Adedire's profile picture
Yinka Adedire2 years ago

FINALLY!

blurrd.eth๐Ÿ›น's profile picture
blurrd.eth๐Ÿ›น2 years ago

Oouuuuuu

Related Videos

A closer look on the GSAP powered animations in Webflow. Just from my perspective. In short, itโ€™s way more powerful than I first thought. The more I use it, the more I like it. Of course, there are some parts missing. But it's the first version. There's still a lot to come. For example, custom ease would already make a huge difference. Breakpoints. Maybe a way to add custom functions as sometimes you need to calculate stuff in JavaScript to get complex animations. The biggest part for me is that you can just build the animation inside a timeline. This makes it so much easier than writing it as code. You can fine tune it so much more. When there would be a way to export the tween as code to add some more functionality would be awesome. You can also add custom classes with the timeline, which can then be used in custom CSS to add more functionality. With a bit of custom code you can also use breakpoints for your animations. By using the custom event the animation can be used in custom code which can also be pretty powerful. Didnโ€™t test it so much yet, but would be cool if you could just take the event and use for example the onComplete() from GSAP or other stuff. For example. let mm = gsap.matchMedia(); const module = Webflow.require("ix3"); module.ready().then(() => { mm.add( { isMobile: "(max-width: 992px)", }, (context) => { let { isMobile } = context.conditions; if (isMobile) { module.emit("Mobile Animation"); } } ); }); "Mobile Animation" is the name of your custom event. I hope that part will get more powerful. Something I miss on the timeline is that when you select more actions you can just drag all actions. It would be cool if you could move it frame by frame with the arrow keys, like in Jitter for example. Or just write a specific point like when you have one selected. For now I would further write the code myself, but Iโ€™m excited to see where itโ€™s going. Maybe there will be a time where you could animate most parts inside Webflow ๐Ÿ™‚ Canโ€™t wait for the next GSAP update!

Eduard Bodak

12,590 views โ€ข 11 months ago