{"id":1005,"date":"2018-02-17T05:47:56","date_gmt":"2018-02-17T05:47:56","guid":{"rendered":"https:\/\/azoora.com\/blog\/?p=1005"},"modified":"2018-12-13T15:54:48","modified_gmt":"2018-12-13T15:54:48","slug":"8-best-free-libraries-for-svg","status":"publish","type":"post","link":"https:\/\/azoora.com\/blog\/javascript\/8-best-free-libraries-for-svg\/","title":{"rendered":"8 Best Free Libraries For SVG"},"content":{"rendered":"<p class=\"single-first-p\">All modern browsers support the&nbsp;<a class=\"inner-link-effect\" href=\"https:\/\/www.webdesignerdepot.com\/2015\/01\/the-ultimate-guide-to-svg\/\"><span class=\"ile-sp\">SVG filetype<\/span><\/a>&nbsp;and it\u2019s quickly becoming a favored choice among web designers.<\/p>\n<p>You can design beautiful icons as SVGs and scale them to any size without quality loss. This is one of the biggest benefits of the SVG format considering&nbsp;<a class=\"inner-link-effect\" href=\"https:\/\/www.webdesignerdepot.com\/2013\/04\/why-should-you-become-retina-ready\/\"><span class=\"ile-sp\">retina displays<\/span><\/a>&nbsp;are on the rise.<\/p>\n<p>If you\u2019d like to animate or manipulate your SVGs that\u2019ll take a little more work. But these free libraries offer the best tools for the job if you\u2019re willing to roll up your sleeves and get your hands dirty in some code.<\/p>\n<div>\n<div id=\"aniBox\">\n<div id=\"aniplayer_aniviewJS\">\n<div id=\"aniplayer_aniviewJSgui\">\n<div id=\"av-container\" class=\" desktop hide-controls\">\n<div id=\"av-inner\">\n<div id=\"slot\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p class=\"fixed-empty-p\">\n<h2>1. SVG.js<\/h2>\n<p>The first library I have to recommend is&nbsp;<a class=\"external inner-link-effect\" href=\"http:\/\/svgjs.com\/\" rel=\"nofollow\"><span class=\"ile-sp\">SVG.js<\/span><\/a>. Naturally this is totally free and open sourced for use in any type of web project.<\/p>\n<p>It\u2019s very lightweight totaling only 16KB when gzipped and about 62KB minified. Granted this is pretty large as a whole, but compared to similar libraries it\u2019s on the smaller side.<\/p>\n<p>Installation is pretty simple with support for npm and a whole page dedicated to&nbsp;<a class=\"external inner-link-effect\" href=\"http:\/\/svgjs.com\/getting-started\/\" rel=\"nofollow\"><span class=\"ile-sp\">getting started<\/span><\/a>.<\/p>\n<p>Each page in the documentation has plenty of JS and HTML codes for you to look through and get started. Plus you can find embedded demos&nbsp;<a class=\"external inner-link-effect\" href=\"http:\/\/jsfiddle.net\/wout\/Lmu56awz\/3\/\" rel=\"nofollow\"><span class=\"ile-sp\">hosted on JSFiddle<\/span><\/a>&nbsp;to see how this library works in action.<\/p>\n<div class=\"finline-large\"><a class=\"external\" href=\"http:\/\/svgjs.com\/\" rel=\"nofollow\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-97681 image-border\" src=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/01-svgjs-homepage.jpg\" sizes=\"(max-width: 1856px) 100vw, 1856px\" srcset=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/01-svgjs-homepage.jpg 1856w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/01-svgjs-homepage-300x149.jpg 300w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/01-svgjs-homepage-768x381.jpg 768w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/01-svgjs-homepage-1024x508.jpg 1024w\" alt=\"01-svgjs-homepage\" width=\"1856\" height=\"921\"><\/a><\/div>\n<p class=\"fixed-empty-p\">\n<h2>2. Snap.svg<\/h2>\n<p>Another popular SVG library is&nbsp;<a class=\"external inner-link-effect\" href=\"http:\/\/snapsvg.io\/\" rel=\"nofollow\"><span class=\"ile-sp\">Snap.svg<\/span><\/a>. It\u2019s a JavaScript library with&nbsp;<strong>zero dependencies&nbsp;<\/strong>and a fairly large support community running through websites like&nbsp;<a class=\"external inner-link-effect\" href=\"https:\/\/snapsvg.slack.com\/\" rel=\"nofollow\"><span class=\"ile-sp\">Slack<\/span><\/a>.<\/p>\n<p>Currently the project is in v0.5.1 so it\u2019s got a long ways to go before a full v1.0 release.<\/p>\n<p>I would still consider this ready for commercial use since it\u2019s been tested heavily for bugs in each release and built to work across&nbsp;<strong>any type<\/strong>&nbsp;of SVG. This includes exported files from Illustrator, InkScape, or hard-coded SVGs in your HTML.<\/p>\n<p>Have a look at the&nbsp;<a class=\"external inner-link-effect\" href=\"http:\/\/snapsvg.io\/demos\/\" rel=\"nofollow\"><span class=\"ile-sp\">demos page<\/span><\/a>&nbsp;for a taste of what Snap can do.<\/p>\n<div class=\"finline-large\"><a class=\"external\" href=\"http:\/\/snapsvg.io\/\" rel=\"nofollow\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-97682 image-border\" src=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/02-snap-svg-homepage.jpg\" sizes=\"(max-width: 1856px) 100vw, 1856px\" srcset=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/02-snap-svg-homepage.jpg 1856w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/02-snap-svg-homepage-300x142.jpg 300w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/02-snap-svg-homepage-768x364.jpg 768w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/02-snap-svg-homepage-1024x485.jpg 1024w\" alt=\"02-snap-svg-homepage\" width=\"1856\" height=\"879\"><\/a><\/div>\n<p class=\"fixed-empty-p\">\n<h2>3. Bonsai.js<\/h2>\n<p>For a more general graphics library I highly recommend&nbsp;<a class=\"external inner-link-effect\" href=\"https:\/\/bonsaijs.org\/\" rel=\"nofollow\"><span class=\"ile-sp\">Bonsai.js<\/span><\/a>. It\u2019s been around for years and it\u2019s one of the more well-maintained projects with a core group of supporters.<\/p>\n<p>This lets you build some pretty cool stuff with SVGs and the canvas element. You can design little icons for landing pages or more complex graphs like pie charts.<\/p>\n<p>Not to mention you get full control over paths in SVGs along with animation effects using keyframes in the Bonsai library.<\/p>\n<p>Take a peek at the&nbsp;<a class=\"external inner-link-effect\" href=\"http:\/\/demos.bonsaijs.org\/\" rel=\"nofollow\"><span class=\"ile-sp\">examples page<\/span><\/a>&nbsp;for a few live demos and visit the&nbsp;<a class=\"external inner-link-effect\" href=\"http:\/\/docs.bonsaijs.org\/\" rel=\"nofollow\"><span class=\"ile-sp\">online docs<\/span><\/a>&nbsp;to get started with your first Bonsai graphics.<\/p>\n<div class=\"finline-large\"><a class=\"external\" href=\"https:\/\/bonsaijs.org\/\" rel=\"nofollow\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-97683\" src=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/03-bonsai-js-script.jpg\" sizes=\"(max-width: 1856px) 100vw, 1856px\" srcset=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/03-bonsai-js-script.jpg 1856w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/03-bonsai-js-script-300x133.jpg 300w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/03-bonsai-js-script-768x341.jpg 768w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/03-bonsai-js-script-1024x455.jpg 1024w\" alt=\"03-bonsai-js-script\" width=\"1856\" height=\"825\"><\/a><\/div>\n<p class=\"fixed-empty-p\">\n<h2>4. Paper.js<\/h2>\n<p><a class=\"external inner-link-effect\" href=\"http:\/\/paperjs.org\/\" rel=\"nofollow\"><span class=\"ile-sp\">Paper.js<\/span><\/a>&nbsp;calls itself the Swiss Army knife of vector graphics scripting. And in many ways this is right on the money.<\/p>\n<p>By default Paper.js works on top of HTML5 canvas elements with its own DOM model to manipulate. You can edit bezier curves right inside the code which gives you far more control with even basic scripting.<\/p>\n<p>Have a look at their&nbsp;<a class=\"external inner-link-effect\" href=\"http:\/\/paperjs.org\/examples\/\" rel=\"nofollow\"><span class=\"ile-sp\">examples page<\/span><\/a>&nbsp;if you\u2019re curious to see this in action.<\/p>\n<p>I\u2019d say this is more of a canvas manipulation library than just a custom animation or SVG library. But it\u2019s definitely powerful and a great choice for anyone getting into SVGs for the web.<\/p>\n<div class=\"finline-large\"><a class=\"external\" href=\"http:\/\/paperjs.org\/\" rel=\"nofollow\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-97684 image-border\" src=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/04-paperjs-script-homepage.jpg\" sizes=\"(max-width: 1856px) 100vw, 1856px\" srcset=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/04-paperjs-script-homepage.jpg 1856w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/04-paperjs-script-homepage-300x139.jpg 300w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/04-paperjs-script-homepage-768x357.jpg 768w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/04-paperjs-script-homepage-1024x476.jpg 1024w\" alt=\"04-paperjs-script-homepage\" width=\"1856\" height=\"862\"><\/a><\/div>\n<p class=\"fixed-empty-p\">\n<h2>5. Rapha\u00ebl<\/h2>\n<p>Here\u2019s a classic JS library for graphics manipulation and SVG scripting.&nbsp;<a class=\"external inner-link-effect\" href=\"http:\/\/dmitrybaranovskiy.github.io\/raphael\/\" rel=\"nofollow\"><span class=\"ile-sp\">Rapha\u00ebl<\/span><\/a>&nbsp;is totally free under the MIT License and available&nbsp;<a class=\"external inner-link-effect\" href=\"https:\/\/github.com\/DmitryBaranovskiy\/raphael\" rel=\"nofollow\"><span class=\"ile-sp\">on GitHub<\/span><\/a>&nbsp;for download.<\/p>\n<p>As of this writing it\u2019s currently in v2.2.1 and has a pretty large base of contributors. All of the code runs in plain JavaScript but that can include TypeScript if you prefer faster coding.<\/p>\n<p>Each graphic on the page gets its own DOM section and can be manipulated just like a DOM element. Custom functions in Rapha\u00ebl make this a great library for beginners just learning the ropes of&nbsp;<a class=\"inner-link-effect\" href=\"https:\/\/www.webdesignerdepot.com\/2014\/11\/25-resources-for-succeeding-with-html5-canvas\/\"><span class=\"ile-sp\">HTML5 canvas<\/span><\/a>.<\/p>\n<p>There\u2019s also quite a few crazy&nbsp;<a class=\"external inner-link-effect\" href=\"http:\/\/dmitrybaranovskiy.github.io\/raphael\/chart.html\" rel=\"nofollow\"><span class=\"ile-sp\">demos<\/span><\/a>&nbsp;if you dig through the main site.<\/p>\n<div class=\"finline-large\"><a class=\"external\" href=\"http:\/\/dmitrybaranovskiy.github.io\/raphael\/\" rel=\"nofollow\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-97685\" src=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/05-raphael-example-graph.jpg\" sizes=\"(max-width: 1856px) 100vw, 1856px\" srcset=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/05-raphael-example-graph.jpg 1856w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/05-raphael-example-graph-300x124.jpg 300w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/05-raphael-example-graph-768x319.jpg 768w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/05-raphael-example-graph-1024x425.jpg 1024w\" alt=\"05-raphael-example-graph\" width=\"1856\" height=\"770\"><\/a><\/div>\n<p class=\"fixed-empty-p\">\n<h2>6. Two.js<\/h2>\n<p>The open source&nbsp;<a class=\"external inner-link-effect\" href=\"https:\/\/two.js.org\/\" rel=\"nofollow\"><span class=\"ile-sp\">Two.js<\/span><\/a>&nbsp;script is a custom 2D drawing API built in JavaScript.<\/p>\n<p>This is not meant for just canvas elements although it does work best for those types of layouts. But you can use Two.js for manipulating a few common formats on the web: SVG, Canvas, and WebGL.<\/p>\n<p>I would say Two.js has a steeper learning curve for someone who\u2019s not super familiar with JavaScript. This is because you can do so much with this library and the features can seem endless.<\/p>\n<p>But one look over&nbsp;<a class=\"external inner-link-effect\" href=\"https:\/\/two.js.org\/examples\/\" rel=\"nofollow\"><span class=\"ile-sp\">the examples page<\/span><\/a>&nbsp;and you\u2019ll get an idea of how much is possible.<\/p>\n<div class=\"finline-large\"><a class=\"external\" href=\"https:\/\/two.js.org\/\" rel=\"nofollow\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-97686\" src=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/06-twojs-example-demo.jpg\" sizes=\"(max-width: 1856px) 100vw, 1856px\" srcset=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/06-twojs-example-demo.jpg 1856w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/06-twojs-example-demo-300x145.jpg 300w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/06-twojs-example-demo-768x372.jpg 768w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/06-twojs-example-demo-1024x496.jpg 1024w\" alt=\"06-twojs-example-demo\" width=\"1856\" height=\"899\"><\/a><\/div>\n<p class=\"fixed-empty-p\">\n<h2>7. Velocity.js<\/h2>\n<p>Technically the&nbsp;<a class=\"external inner-link-effect\" href=\"http:\/\/velocityjs.org\/\" rel=\"nofollow\"><span class=\"ile-sp\">Velocity.js<\/span><\/a>&nbsp;library is a free animation library, however it does support SVGs making it a fantastic choice for all UI\/UX animation.<\/p>\n<p>You can also run Velocity with jQuery or on its own using vanilla JS.<\/p>\n<p>If you look through the main page you\u2019ll find all the setup info you need along with documentation for each type of animation. Most of them even have demos&nbsp;<a class=\"external inner-link-effect\" href=\"https:\/\/codepen.io\/julianshapiro\/pen\/wmtEH\" rel=\"nofollow\"><span class=\"ile-sp\">on CodePen<\/span><\/a>&nbsp;so you can see how they work in the browser.<\/p>\n<p>Stick to Velocity if you\u2019re looking to create&nbsp;<strong>practical<\/strong>&nbsp;animations for a website. I specifically recommend it for basic page UX motion or more complex&nbsp;<a class=\"inner-link-effect\" href=\"https:\/\/www.webdesignerdepot.com\/2017\/04\/microinteractions-designing-with-details\/\"><span class=\"ile-sp\">microinteractions<\/span><\/a>.<\/p>\n<div class=\"finline-large\"><a class=\"external\" href=\"http:\/\/velocityjs.org\/\" rel=\"nofollow\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-97687\" src=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/07-velocity-js-script-homepage.jpg\" sizes=\"(max-width: 1856px) 100vw, 1856px\" srcset=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/07-velocity-js-script-homepage.jpg 1856w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/07-velocity-js-script-homepage-300x91.jpg 300w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/07-velocity-js-script-homepage-768x234.jpg 768w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/07-velocity-js-script-homepage-1024x312.jpg 1024w\" alt=\"07-velocity-js-script-homepage\" width=\"1856\" height=\"566\"><\/a><\/div>\n<p class=\"fixed-empty-p\">\n<h2>8. Vivus.js<\/h2>\n<p>With&nbsp;<a class=\"external inner-link-effect\" href=\"https:\/\/maxwellito.github.io\/vivus\/\" rel=\"nofollow\"><span class=\"ile-sp\">Vivus.js<\/span><\/a>&nbsp;you can build one very specific type of animation: the drawn outline effect.<\/p>\n<p>You see this with SVG images all the time. An SVG path can be animated into view one point at a time so it looks like the entire graphic is being drawn by hand.<\/p>\n<p>This is a really neat effect and with Vivus it\u2019s super easy to setup. Granted this doesn\u2019t radically improve the user experience or increase usability, but it is a really fun library to work with.<\/p>\n<p>Especially if you\u2019re brand new to SVGs and you want an easy JS library to play with for testing.<\/p>\n<div class=\"finline-large\"><a class=\"external\" href=\"https:\/\/maxwellito.github.io\/vivus\/\" rel=\"nofollow\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-97688 image-border\" src=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/08-vivus-js-homepage.jpg\" sizes=\"(max-width: 1856px) 100vw, 1856px\" srcset=\"https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/08-vivus-js-homepage.jpg 1856w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/08-vivus-js-homepage-300x114.jpg 300w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/08-vivus-js-homepage-768x291.jpg 768w, https:\/\/netdna.webdesignerdepot.com\/uploads\/2018\/02\/08-vivus-js-homepage-1024x388.jpg 1024w\" alt=\"08-vivus-js-homepage\" width=\"1856\" height=\"704\"><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>All modern browsers support the&nbsp;SVG filetype&nbsp;and it\u2019s quickly becoming a favored choice among web designers. You can design beautiful icons as SVGs and scale them to any size without quality loss. This is one of the biggest benefits of the SVG format considering&nbsp;retina displays&nbsp;are on the rise. If you\u2019d like to animate or manipulate your [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1006,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[12],"tags":[87],"jetpack_featured_media_url":"https:\/\/azoora.com\/blog\/wp-content\/uploads\/2018\/02\/03-bonsai-js-script.jpg","jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p7FQPL-gd","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/posts\/1005"}],"collection":[{"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/comments?post=1005"}],"version-history":[{"count":3,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/posts\/1005\/revisions"}],"predecessor-version":[{"id":1636,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/posts\/1005\/revisions\/1636"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/media\/1006"}],"wp:attachment":[{"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/media?parent=1005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/categories?post=1005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/tags?post=1005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}