[{"data":1,"prerenderedAt":242,"buildId":243},["ShallowReactive",2],{"\u002Fblog\u002Fsvg-animation":3},{"id":4,"title":5,"author":6,"body":24,"date":231,"description":232,"extension":233,"image":234,"meta":235,"minRead":236,"navigation":237,"path":238,"published":237,"seo":239,"stem":240,"__hash__":241},"blog\u002Fblog\u002Fsvg-animation.md","Animating SVG on the web",{"name":7,"description":8,"avatar":9,"to":11,"socials":12},"Oskar","spaghetti chef",{"src":10,"alt":7},"\u002Fblog\u002F_meta\u002Fprofiles\u002Foskar.jpg","https:\u002F\u002Fvaa.ski",[13,16,20],{"name":14,"url":11,"icon":15},"website","material-symbols:link-rounded",{"name":17,"url":18,"icon":19},"email","mailto:noreply@vaa.ski","material-symbols:mail-outline-rounded",{"name":21,"url":22,"icon":23},"github","https:\u002F\u002Fgithub.com\u002Fvaaski","simple-icons:github",{"type":25,"value":26,"toc":226},"minimark",[27,32,36,42,45,48,61,92,100,136,140,170,174,186,211,216],[28,29,31],"h1",{"id":30},"the-problem","The Problem",[33,34,35],"p",{},"I wanted to have neat looking vector-based animations for this very site.\nLet's take the header logo as an example for what I'm trying to build.",[37,38,39],"u-card",{},[40,41],"blog-svg-animation-infinite-logo-demo",{},[33,43,44],{},"As you can see, there's a bunch of moving pieces and path transforms.",[33,46,47],{},"And as is the case with mostly everything web-based, there are many ways to approach a problem.\nHere is a quick overview of the avenues that came to my head:",[49,50,52,53,57,58],"h4",{"id":51},"animating-d-property-with-css-keyframes","Animating ",[54,55,56],"code",{},"d"," property with CSS ",[54,59,60],{},"@keyframes",[62,63,64,79],"ul",{},[65,66,67,71],"li",{},[68,69,70],"strong",{},"pros",[62,72,73,76],{},[65,74,75],{},"relatively easy to implement",[65,77,78],{},"works without js",[65,80,81,84],{},[68,82,83],{},"cons",[62,85,86,89],{},[65,87,88],{},"safari doesn't support it",[65,90,91],{},"hard to maintain",[49,93,95,96,99],{"id":94},"svg-animate-element","SVG ",[54,97,98],{},"\u003Canimate>"," element",[62,101,102,124],{},[65,103,104,106],{},[68,105,70],{},[62,107,108,110,113],{},[65,109,78],{},[65,111,112],{},"works on all major browsers",[65,114,115,116,123],{},"works even in github readme (",[117,118,122],"a",{"href":119,"rel":120},"https:\u002F\u002Fgithub.com\u002Fvaaski\u002Fvaaski\u002Fblob\u002Fmain\u002Freadme.md",[121],"nofollow","see example",")",[65,125,126,128],{},[68,127,83],{},[62,129,130,133],{},[65,131,132],{},"super annoying to create",[65,134,135],{},"weirdly hard to find documentation besides the spec",[49,137,139],{"id":138},"lottie-adobe-after-effects","Lottie + Adobe After Effects",[62,141,142,154],{},[65,143,144,146],{},[68,145,70],{},[62,147,148,151],{},[65,149,150],{},"easiest to implement; AE is a professional tool",[65,152,153],{},"can handle complex animations with many layers",[65,155,156,158],{},[68,157,83],{},[62,159,160,167],{},[65,161,162,163,166],{},"AE is paid ",[68,164,165],{},"Adobe"," software",[65,168,169],{},"only works with js, has an impact on bundle size",[49,171,173],{"id":172},"using-a-library-in-js","Using a library in JS",[33,175,176],{},[177,178,179,180,185],"em",{},"My preferred pick for this is ",[117,181,184],{"href":182,"rel":183},"https:\u002F\u002Fanimejs.com",[121],"anime.js",". I know GSAP went free recently, but the couple of minutes I spent looking at it made it feel comparatively clunky and old. Also the anime.js documentation is just super pretty to look at.",[62,187,188,200],{},[65,189,190,192],{},[68,191,70],{},[62,193,194,197],{},[65,195,196],{},"relatively easy to implement; can handle path transformations automatically",[65,198,199],{},"can orchestrate and sync with other animations",[65,201,202,204],{},[68,203,83],{},[62,205,206,208],{},[65,207,169],{},[65,209,210],{},"said path transforms can sometimes look weird if not carefully crafted",[212,213,215],"h2",{"id":214},"see-also","See also",[62,217,218],{},[65,219,220,221],{},"CSS-Tricks - ",[117,222,225],{"href":223,"rel":224},"https:\u002F\u002Fcss-tricks.com\u002Fmany-tools-shape-morphing\u002F",[121],"The Many Tools for Shape Morphing",{"title":227,"searchDepth":228,"depth":228,"links":229},"",2,[230],{"id":214,"depth":228,"text":215},"2026-08-05","so you want buttery smooth vector-based animations that work everywhere and are easy to create? haha good luck dumbass","md","\u002Fblog\u002F_meta\u002Fhero-placeholder-image.png",{},69,true,"\u002Fblog\u002Fsvg-animation",{"title":5,"description":232},"blog\u002Fsvg-animation","qtcpjbFsOhOqyKmpn6jhlAUpQ1kZsa-CrmYqp3rjT1Y",1796043944861,"a729ea4a-716f-4284-8915-fcde5598ee51"]