react-svg-color

2.3.0 • Public • Published

react-svg-color

Version NPM

react-svg-color allows you to change any color in a svg file.

Installation

    npm i react-svg-color

An example of how to use the component

    import SvgColor from 'react-svg-color'
    import Umbrella from 'umbrella.svg'
    
    ...
 
    <SvgColor 
        svg={Umbrella} 
        width={200} 
        colors={["#7EADCC", "#316F99", "#FFFDB8", "#FF8D78", "#FF8D78", "#7EADCC", "#B8FFF6", "#B8FFF6","#FF8D78"]}   
    />

Result

Props

Name Type Description
svg svg file Paste your svg file
width int Change width
colors array[String] Color array to change the desired colors (hex)
rotate int Change rotation

Readme

Keywords

Package Sidebar

Install

npm i react-svg-color

Weekly Downloads

84

Version

2.3.0

License

ISC

Unpacked Size

8.44 kB

Total Files

6

Last publish

Collaborators

  • lucasconsejo