June 2021
Intermediate to advanced
398 pages
9h 35m
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.[47]
The install process consists of two steps. First, add the package using yarn:
| | $ yarn add animate.css |
Second, include the line ...