react-svg-pseudo-filter
v0.0.0
Published
A module to "filter" SVG without <filter> tag
Downloads
4
Readme
React SVG Filter
Overview
A pseudo-"filter" used to filter <svg> elements with more customization and (supposedly) better performance than using SVG's <filter>, using elements traversal and modification approach to filter the SVG elements individually.
Features
- Grayscaling filter
- Colorizing (uniformize colors of each elements)
- Option to omit colors (color)
Usage
<SVGFilter>
<svg...> // Your SVG files here
</SVGFilter>
Supported props :
grayscale: Applying the grayscale filter to SVGcolorize: Applying the color uniformization filter to SVGcolorProps: Properties to be used ifcolorizefilter activatedcolor: string: Color to be applied incolorizefilteromittedColors: string[]: Colors to be excluded from filtering when an element's color matched one of the color in this array
TODO
- Publish to NPM + Yarn
- More filters (sepia, monochrome, etc.)
- Documentations
- Ability to embed external files
