Skip to content

Animations

An animation is triggered when the contents of an AnimationGroup component are re-ordered. Animations do not run when an element is added or removed, only when the index of an existing data item within the AnimationGroup component changes.

1
2
3
4
5
6
7
8
9

Adding parameters

Animations can have parameters:

1
2
3
4
5
6
7
8
9

Custom CSS animations

Animations can use custom functions that provide the node, an animation object and any parameters as arguments. The animation parameter is an object containing from and to properties each containing a DOMRect describing the geometry of the element in its start and end positions. The from property is the DOMRect of the element in its starting position, and the to property is the DOMRect of the element in its final position after the list has been reordered and the DOM updated.

1
2
3
4
5
6
7
8
9

Custom JS animations

While you should generally use CSS for animations as much as possible, there are some effects that can’t be achieved without JavaScript:

1
2
3
4
5
6
7
8
9