Animotion
Subscribe to element animation events in a declarative way DEMO
Usage
Having the following CSS
@ 50% 100% }
Listen for events
const animotion = ;const div = document; let iterationCount; const start = {console};const iteration = {console};const end = {console};
Filter by animation name
This could be useful if you add/remove classes that involve animations in the same element and you want to react different to them:
//The start event will not be called because the animation name is different name'bar' //Events are called because the animation name matches name'foo'
Demo
Tracking animation status, slapsed time and iteration number with Animotion
https://zzarcon.github.io/animotion/
Installation
$ npm i animotion -S
Author
@zzarcon 🚀