tiny-svg
tiny-svg is a minimal toolbelt for creating clean SVG applications.
Features
- no wrapping magic, using native DOM elements instead
- modular, just use what you need
2kB
minified + gzippedinnerSVG
support- simplified attribute handling
- geometry helpers
Checkout provided utilities.
Usage
; var container = document;var element = ; var g = ; // add classes, SVG style!; var text = ` <g class="foo bar"> <rect x="0" y="0" width="0" height="0" rx="50" ry="50"/> </g>`; // set innerSVG;
Your favourite module bundler should apply tree-shaking to only include the components your application requires. If you're using CommonJS modules give common-shake a try.
Related
License
MIT