akrdesign Posted September 18, 2024 Posted September 18, 2024 I want to animate svg from one edge to second edge can anyone help me with this. I want to reveal svg from left to right. Here is a sample project link https://stackblitz.com/edit/stackblitz-starters-nntne5?file=app%2Fpage.tsx
Solution mvaneijgen Posted September 18, 2024 Solution Posted September 18, 2024 What have you tried already? We love to see what you can come up with, that way we can see your thought process and thus better help you understand the tools! You're sharing page.tsx, but there is no GSAP code in that file. My suggestion would be to use the Draw SVG plugin, but your SVG is not created as a line but instead it are individual shapes, which you can't draw the way I think you're looking for. The only solution with your current SVG is to create a clip path and animate the clip path but that is probably not the effect you're after See the Pen GRbbaaR by mvaneijgen (@mvaneijgen) on CodePen. Animating a dashed line is even more involved and our own @PointC has a create post about that. Hope it helps and happy tweening! https://www.motiontricks.com/svg-dashed-line-animation/ 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now