You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature request] Add a callback option when animation is completed #37
This would be great. Currently I'm having some issues combining auto animate with HTML5 drag and drop. As it seems like the library takes the element out of the flow the onDragLeave is triggered. Using a callback it's easy to workaround this, while right now, you have to use setTimeout.
I'm using useElementBounding in my vue 3 project, and because of the autoAnimate animation, its logic breaks a bit. This would be easy to fix if there was some kind of callback or end-of-animation event
Reacted by raiden, serdtsekol, Leonid, Sébastien Matos and Jörundur Jörundsson
Reacted by serdtsekol, Leonid and Jörundur Jörundsson
Landed in #255 ✨ — autoAnimate(el, { animations: { remain: false }, onAnimationEnd: (el, action) => {} }). Turn off just the animations you don't want (defaults stay for the rest), and get a callback when each one finishes. Works in every adapter; ships in the next release.
Activity
vixducis commentedon Nov 3, 2022
This would be great. Currently I'm having some issues combining auto animate with HTML5 drag and drop. As it seems like the library takes the element out of the flow the onDragLeave is triggered. Using a callback it's easy to workaround this, while right now, you have to use setTimeout.
john-psina commentedon May 29, 2024
Any updates on this?
I'm using useElementBounding in my vue 3 project, and because of the autoAnimate animation, its logic breaks a bit. This would be easy to fix if there was some kind of callback or end-of-animation event
feat: animations option to turn off add/remove/remain, and onAnimatio…
justin-schroeder commentedon Nov 22, 2026
Landed in #255 ✨ —
autoAnimate(el, { animations: { remain: false }, onAnimationEnd: (el, action) => {} }). Turn off just the animations you don't want (defaults stay for the rest), and get a callback when each one finishes. Works in every adapter; ships in the next release.justin-schroeder commentedon Nov 23, 2026
Out now in
@formkit/auto-animate@0.11.0🚢