I end up using animate.css a lot more often than I ever thought I would, so here’s how to include it in your Sage 9-based project. This is really simple, but I want to start writing more of these, and this was an easy starting point.
Install
yarn add animate.css
Autoload in Sage
Create a new file at resources/assets/styles/autoload/_animate.scss with the following content:
@import "~animate.css/animate.css";
Add animate.css Classes to Your Markup!
Here’s an example making Page h1s fade in while sliding up: resources/views/partials/page-header.blade.php
Thanks for this, @MWDelaney! Question for you: autoloading like that is new to me - are there pros/cons to doing it that way vs putting the import line into main.scss?
The Animate.css syntax in this article is deprecated. Ever since Animate.css v4.0.0 you must include the prefix animate__ with your Animate.css classes.