Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

DrawSVG - Animation of fill

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts


I wanted to create similar animation like on this website http://thieb.co/ when you must click and hold to enter.


With this svg file. 



But with drawSVG plugin i can't animate fill. I searched just any solution but it has not helped me.


Thank you for answer.


See the Pen mLWObG?editors=1010 by SimkoDucko (@SimkoDucko) on CodePen

Link to comment
Share on other sites

Hi @SimonDucak :)


Animated handwriting is a bit tricky. I know the effect you're trying to achieve, but drawSVG only works with strokes - not fills. You have a couple options. The easiest would be to create a mask for the text and animate the stroke of the mask to reveal the filled path. The other option is to create an open path that looks like the actual font. I wrote a couple posts on CodePen about how to create a handwriting effect. You may find some of the info useful.





Here's the demo I made as part of those posts.


See the Pen MpLVvO by PointC (@PointC) on CodePen


Hopefully that helps. Happy tweening.



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