andrewMacmurray / elm-simple-animation

stateless animation utils for Elm
https://package.elm-lang.org/packages/andrewMacmurray/elm-simple-animation/latest/
MIT License
50 stars 3 forks source link

leveraging animationend and transitionend #16

Open andrewMacmurray opened 3 years ago

andrewMacmurray commented 3 years ago

It could be nice to have a way to fire events when an animation or transition finishes - a recent example from the elm slack was animating something before a page transition.

One way of doing this could be to use the browser's animationend / transitionend events https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/animationend_event

Here's a minimal example of that approach - https://ellie-app.com/cZPWSKSXcPZa1

Things I'd like to find out before anything like this gets added: