Working with SVG.js
SVG.js was created by Wout Fierens and is currently maintained by Ulrich-Matthias Schäfer, Jon Ronnenberg, and Rémi Tétreault. It's designed to be lightweight and fast, and to be a friendly interface for working with SVG. It's more actively maintained than Snap.svg
, so it's got that going for it. As of the time of writing, the most recent code was added to the project within the past two weeks.
Getting started with SVG.js
Like Snap.svg
, SVG.js is available on npm
, so the easiest way to get started with SVG.js is to install it using npm
:
npm install svg.js
Note
Make sure you install svg.js
with npm
and not svg.js
. Both work and both point to the correct project. svg.js
is, however, out of date because the official package is svg.js
.
It's also available for download directly from the website http://svgjs.com/installation/#download. It is also available to download or clone from GitHub, http://svgjs.com/ and is available on cdnjs
.
Once you've done that, it's as easy as including...