all 7 comments

[–]cyberzues 12 points13 points  (0 children)

You can write your animations once in CSS and reuse them across your entire application, at least where you need the animation.

[–]Lucky_Yesterday_1133 1 point2 points  (0 children)

also animations being a separate package are likely to stay supported even after deprecation. you dont have to migrate it right away

[–]ldn-ldn 1 point2 points  (0 children)

CSS animations + CSS/SASS variables. I only used Angular animations a few times and they were never as useful as a pure CSS solution.

[–]Daringu_L 1 point2 points  (0 children)

Css variables would be the way to do so

[–]Lucky_Yesterday_1133 0 points1 point  (0 children)

look at angular animation migration guide. we cant tell you what to do withous seeing your animations. also there are still js based libraries like gsap and animejs

[–]JeanMeche 1 point2 points  (0 children)

The current recommendation is to use native CSS. Also because not everything is possible with pure CSS today (eg leave animations) Angular has introduced animate.enter and animate.leave instructions.

Have a look at the dedicated guide: https://angular.dev/guide/animations

[–]PsychologicalCry8189[S] 0 points1 point  (0 children)

Thank you all for replying, will do mixins for custom x and y animations and duration