At CDNify we have a few developers who like working on personal projects and building their own custom libraries. Being time consuming and sometimes a pain to build, they often relent and work with pre-built libraries. Why? Because it’s so much easier to pickup an existing library then it is to build one.
Looking for a handful of SVG libraries? Then checkout our top pick below.
SVG.JS is a lightweight library for manipulating and animating SVG files, so light that the entire library is around 9k gzipped, making it one of the most robust and smallest libraries around.
How does it work? See for yourself, have the library in your source files and use the code below which utilises SVG.JS to produce graphical text, alternatively checkout their test page: svgjs.com/test.
// create svg drawing paper
var draw = SVG('canvas')
// create image
var image = draw.image('images/shade.jpg')
// create text
var text = draw.text('SVG.JS').move(300, 0)
family: 'Source Sans Pro'
, size: 180
, anchor: 'middle'
, leading: '1em'
// clip image with text
Key features include:
Checkout Bonsai or just play about with their online editor: Orbit
Easily pickup and start using the library with the following code:
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>