2.3.0 • Published 4 years ago
react-svg-color v2.3.0
react-svg-color
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 | arrayString | Color array to change the desired colors (hex) |
rotate | int | Change rotation |