Jump to content
Search Community

Animated signature with strokeDasharray

Lars Ejaas test
Moderator Tag

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

Hi everybody

 

I just wanted to share how you can animate an SVG signature with a clipping path.

 

I took me some time to get it right, and didn't really find a good guide to this - so thought I would share it.

 

Browser support will probably be better using the DRAWsvg plugin. But if you want to do it without the plugin - this is the way to do it:

 

 

ONE IMPORTANT NOTE! It is very crucial that you make sure that the inline SVG DOES not contain any STROKE-dasharray or  STROKE-dashoffset data under "style" for the clipping path: Otherwise the animation won't work! just manually delete the data under <STYLE>

 

See the Pen mdbobdj by lars-ejaas (@lars-ejaas) on CodePen

  • Like 1
  • Thanks 1
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...