# svg.js A lightweight library for manipulating and animating SVG. Svg.js has no dependencies and aims to be as small as possible. Svg.js is licensed under the terms of the MIT License. See [svgjs.com](http://svgjs.com) for an introduction, [documentation](http://documentup.com/wout/svg.js) and [some action](http://svgjs.com/test). [![Wout on Gittip](http://files.wout.co.uk/github/gittip.png)](https://www.gittip.com/wout/) ## Usage ### Create a SVG document Use the `SVG()` function to create a SVG document within a given html element: ```javascript var draw = SVG('drawing').size(300, 300) var rect = draw.rect(100, 100).attr({ fill: '#f06' }) ``` The first argument can either be an id of the element or the selected element itself. This will generate the following output: ```html