prosvg

1.0.2 • Public • Published

PROSVG

Inject svg images in html which makes images dynamic and allows them to be processed dynamically like html elements with CSS/JS.

Usage

import prosvg from 'prosvg'

prosvg({
  url: '/test.svg', // String: SVG path
  el: '#svg-1', // String | HTML element: Element in which svg to be injected
  stroke: 'white', // String: SVG stroke color
  fill: 'black', // String: SVG fill color
  cacheKill: true, // Boolean: Append query string in svg url to avoid CORS issues (default: true)
  save: true // Boolean: Cache assets once fetched (default: true)
})

Size of injected SVG will be equal to the parent div size.

Readme

Keywords

none

Package Sidebar

Install

npm i prosvg

Weekly Downloads

0

Version

1.0.2

License

none

Unpacked Size

14.4 kB

Total Files

7

Last publish

Collaborators

  • neilveil