September 2022
Intermediate to advanced
410 pages
10h 7m
English
All this animation talk makes me wonder about the transitions we built in Chapter 2, Hotwire and Turbo with Turbo Streams, where we have new elements appearing in our favorites list and old ones being removed. It’d be cool to be able to animate those transitions. Turns out we can do this, though managing the outgoing transitions takes a little bit more work.
I’m going to call in a helper for the animation, rather than continuing to code the transitions by hand. The Animate.css library adds quite a few useful little CSS animations that are just a couple of CSS classes away.[43]
Animate.css is distributed as an NPM package that contains both JavaScript and CSS. We haven’t encountered ...