#BoomSVGLoader
BoomSVGLoader is an AJAX solution for your SVG sprite.
This plugin simply loads your compiled SVG sprite into the page immediately after the opening <body>
tag. The SVG sprite is wrapped in a visually hidden <div>
. Original technique explained on CSS Tricks.
There's a few options to get up and running with BoomSVGLoader:
- Download the latest release
- Clone the repo,
git clone git://github.com/boomtownroi/boomsvgloader.git
- Install with Bower:
bower install boomsvgloader --save
- Install with npm:
npm install boomsvgloader
-
BoomSVGLoader JS files are in the dist/ folder. Either add it to your script bundle build process or load it directly in the page.
<script src='js/boomsvgloader.min.js'></script>
-
Call BoomSVGLoader's load function with the path to your SVG sprite.
boomsvgloader.load('/path/to/your/sprite.svg')
-
Use your SVGs! The name after the # should match a symbol ID inside of your SVG sprite.
<svg><use xlink:href="#heart"/></svg>
BoomSVGLoader is maintained by using the Semantic Versioning Specification (SemVer)
Copyright 2015 BoomTown under the MIT License