Components
TransitionGroup
Vue's <TransitionGroup> with AnimeJS enter, leave and move animations.
<AnimeTransitionGroup> works like Vue's
<TransitionGroup>,
but always renders a wrapper element, a div by default. It animates
v-for items that enter and leave, and AnimeJS
layout moves the rest.
Animate a list
API
animation
AnimeTransitionStyleName | AnimeTransitionGroupAnimation
Enter, leave and move together. A style name sets all three, or pass
{ enter, leave, move }. Defaults to a fade in over 250ms and a fade out
over 150ms. Defaults sets another for the app.enterAnimation
AnimeTransitionStyleName | AnimationParams
Overrides the enter in
animation. A function value such as stagger()
counts the items that enter in the same update, so one item added later
starts with no delay.leaveAnimation
AnimeTransitionStyleName | AnimationParams
Overrides the leave in
animation. A function value counts the items
that leave in the same update.moveAnimation
AnimeTransitionStyleName | AnimeMoveParams | false
How items move to a new position: a style name,
{ duration, delay, ease },
or false to skip moves. It wins over the move in animation, which
only a custom or preset style sets. Moves are skipped when reduced motion
is on. Set it to false when items only enter and leave, and the group
measures nothing. See
Performance. Defaults to
{ duration: 350, ease: 'out(3)' }.deps
unknown[]
Values that trigger a move when they change, including nested changes.
Adding, removing or reordering items always animates. A function entry is
read as a getter, such as
() => state.view, so the group moves when the
getter's result changes. Without deps, every re-render measures all
elements, even one caused by a parent passing a new array prop.shallow
boolean
Animate only when an entry of
deps is replaced, not when something nested
inside it changes. Defaults to false.appear
boolean
Run the enter animation for the items present on the first render.
Defaults to
false.tag
string
The element rendered around the items. Defaults to
'div'.absoluteLeave
boolean
Leaving items switch to
position: absolute as soon as they start
leaving, so the rest close the gap while they animate out. They are placed
against the group, so give it position: relative. Defaults to true.waapi
boolean
Run the enter and leave with
waapi.animate() instead of animate().
The animation props then take waapi.animate() params. Moves still run
on AnimeJS layout. Defaults to false. See
Keep transitions smooth during hydration.completeOnTabHidden
boolean
Jump running animations to their end when the browser tab is hidden.
Defaults to
false.See also
<AnimeTransition>: animate a single element- Transition styles: the built-in style names
<AnimeLayoutGroup>: animate mounted elements that change size or position