# svg-filter-animation

#### Plays given SVG-filter animations created with SVG-Pro
See https://github.com/JJ995/svg-pro

## Installation
Install package to your project:
````
npm install svg-filter-animation
````
Include package:
````
import SVGFilterAnimation from 'svg-filter-animation';
````
Paste your generated filter code on your site and link the filter to an element via CSS.  e.g.: ``style="filter: url(#svgFilter)"``
Make sure you have set an unique ID for the filter!

Place the downloaded keyframes .json-file somewhere accessible on your server.

Trigger the animation whenever you want by calling:
```
SVGFilterAnimation.SVGFilterAnimation([PATH_TO_KEYFRAMES]);
```
e.g.:
```
SVGFilterAnimation.SVGFilterAnimation('/keyframes.json');
```
