A lightweight library for manipulating and animating SVG.

      
        // create svg drawing
        var draw = SVG('drawing')

        // create image
        var image = draw.image('images/background.jpg')
        image.size(650, 650).y(-150)

        // create text
        var text = draw.text('SVG.JS').move(300, 0)
        text.font({
          family: 'Source Sans Pro'
        , size: 180
        , anchor: 'middle'
        , leading: 1
        })

        // clip image with text
        image.clipWith(text)
      
    
Tweet
The code above is the the exact same code used to create the masked header at the top of this page. With svg.js you have all the power of vector graphics at pocket size.

Not convinced yet? Here are a few highlights:

Downloads

svg.js (for development) - lots of comments

svg.min.js (for production) - 15k when gzipped

Or grab the latest version from cdnjs.com.

Changelog

Wondering what has changed in the latest releases? Have a look at the change log.

Recommendations

Domain Tips recommends svg.js library for manipulating and animating SVG.
Fork me on GitHub