New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

svg-loaders

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svg-loaders

Loading icons and small animations built with SVG and CSS.

  • 0.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Example

All loaders may be previewed at:

http://samherbert.net/svg-loaders

NOTE: These loaders were originally built to only use SMIL animations; however, all animations have been updated with CSS animations. Since Chrome 45, the use of SMIL animations have been deprecated in Chrome browsers.

The SMIL versions are still in included in this repo, but it is recommended to use the CSS version of a loader if you're planning on using it in a web browser.

Usage

Download or bower install svg-loaders

<img src="svg-css-loaders/puff.svg" />

An icon's color can be manipulated by changing the fill or stroke value in the CSS block of the SVG file.

<svg xmlns="http://www.w3.org/2000/svg" width="44" height="44" viewBox="0 0 44 44">
  <style type="text/css">
  <![CDATA[
    circle {
      stroke: #fff;
      stroke-width: 3;
    }
  ]]>
  </style>
[...]

Note: Not all browsers support SVG, or more specifically, animated SVGs. Check (http://caniuse.com/#feat=svg-smil) to make sure you're good to go. If not, you may want to implement a fallback.

Minify

All SVG files are fairly small in size, but you can make them even smaller by minifying with something like SVGO.

Keywords

FAQs

Package last updated on 12 Feb 2019

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc