akveo / eva-icons

A pack of more than 480 beautifully crafted Open Source icons. SVG, Sketch, Web Font and Animations support.

Home Page:https://akveo.github.io/eva-icons/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can i use an animation with JS?

kei0719 opened this issue · comments

commented

Hello. first of all, it's good library the evaicons.

I have one question, how can i use an animation ( available 4 types ) with JS?

Hi @kei0719 thank you for your feedback.

In order to apply the animation to an icon, you can add data-eva-animation attribute and pass animation type zoom | pulse | shake | flip, animation will be work by hover.
e.g. <i data-eva="github" data-eva-animation="zoom"></i>

Also you can add animation as property in replace method eva.replace({ animation: { type: 'zoom | pulse | shake | flip'}), animation should apply for all icons on a page.

Animation and other available property will be added to the documentation soon.

commented

Excellent! Thank you.