Skip to content

Instantly share code, notes, and snippets.

@marekalgoud
Last active September 26, 2019 08:39
Show Gist options
  • Save marekalgoud/233596e0c5f69945800cad14dbe93701 to your computer and use it in GitHub Desktop.
Save marekalgoud/233596e0c5f69945800cad14dbe93701 to your computer and use it in GitHub Desktop.
anim in
import anime from 'animejs/lib/anime.es.js'
export default (targets) => {
targets.style.opacity = 0
targets.style.transform = 'translateY(100px)'
const translateY = '0'
const opacity = 1
const anim = anime.timeline({
easing: 'easeInOutSine',
duration: 1000
})
anim.add({
targets,
opacity,
translateY
})
return anim.finished
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment