3.2.5 • Published 1 year ago

animation-resolve v3.2.5

Weekly downloads
3
License
MIT
Repository
github
Last release
1 year ago

Animation Resolve

NPM publish npm version

Small module I often use with Mithril.js and onbeforeremove() to animate a component before removing it from the DOM.

This module (ESM and CJS) supplies a function that returns a Promise which resolves when a CSS animation completes after updating a DOM nodes CSS class.

With Mithril

.animateOut {
    animation: forwards 500ms animateOut;
}

@keyframes animateOut {
    100% {
        opacity: 0;
    }
}
import animationResolve from "animation-resolve";

export default {
    onbeforeremove(vnode) => animationResolve(vnode.dom, "animateOut"),

    view() {
        return m("div", "animates out");
    }
}
3.2.5

1 year ago

3.2.4

1 year ago

3.2.3

1 year ago

3.2.2

4 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.0.1

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago