1.0.2 • Published 3 years ago

prosvg v1.0.2

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

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.