diff --git a/src/animations.js b/src/animations.js new file mode 100644 index 0000000..00d9aba --- /dev/null +++ b/src/animations.js @@ -0,0 +1,31 @@ +import anime from 'animejs/lib/anime.es.js' + +// Appear/Disappear +export const zoomFadeIn = (node, { targets, duration }) => { + return { + css: t => { + anime({ + targets, + duration, + easing: 'easeInOutCirc', + opacity: [0, 1], + scale: [.9, 1], + delay: anime.stagger(100) + }) + } + } +} +export const zoomFadeOut = (node, { targets, duration }) => { + return { + css: t => { + anime({ + targets, + duration, + easing: 'easeInOutCirc', + opacity: [1, 0], + scale: [1, .9], + delay: anime.stagger(100) + }) + } + } +}