Join the Webstudio community

Updated 4 weeks ago

Animating Radix components with GSAP

Did anyone had experience of animation Radix Sheet or Dialog component with GSAP? Cause I have no luck here.
I already using GSAP for other animations on the site, that's why I want to avoid adding Animotion code.
J
O
b
4 comments
I have not but I can share my findings having written Animotion.

  1. Ensure the animations are applied to the right instance. See https://dub.sh/ani "Applying attributes to Radix Components" for each component and the instance to apply it to.
  1. You don't need javascript so idk that gsap if the proper tool. They are just css animations.
  1. They target states like data open and closed. You can see unminified code of animotion in the template directions.
I have nearly no experience with GSAP but given that Animotion for radix requires zero JS, makes me think thats the route to go. You can insert animotion and delete both JS html embeds
Just css is always preferrable when possible, gsap for complex stuff
Thanks, I checked animotion code and it's basically just CSS animation! So it will not affect load speeds, it's awesome. I will go with it.
I have some complex animations on site with GSAP and it's easier to write code for animation timelines with GSAP compared to CSS.
But for radix components not sure how to use GSAP. I need to track appearing dialog in the dom somehow to animate it. Will research this thing later
I would say that this shouldn't be done with GSAP, because tracking these things may be challenging and error prone, but also there isn't really a timeline to show the dialog with an animation or at least its a simple one and can be easily expressed with keyframes.
Add a reply
Sign up and join the conversation on Discord