Socket
Book a DemoInstallSign in
Socket

boomsvgloader

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boomsvgloader

BoomSVGLoader is a simple AJAX solution for your SVG sprite.

0.0.2
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
2
Weekly downloads
 
Created
Source

#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.

Simple Demo

Installation

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

Usage

  • 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>

Versioning

BoomSVGLoader is maintained by using the Semantic Versioning Specification (SemVer)

Copyright 2015 BoomTown under the MIT License

Keywords

boomsvgloader

FAQs

Package last updated on 06 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.