Animate.css: yarn add animate.css doesn't work

Created on 24 Jun 2020  路  4Comments  路  Source: animate-css/animate.css

Hey, i found a lilte bug,
When running yarn add animate.css the package is not imported (at least on dev mode)

The work around is: import it using cdn

Just wanna post it so anyone who face the same issue can see

thanks

Most helpful comment

Would it be worth mentioning this in the docs? They do kind of imply that running yarn add or npm install will be all you need to do 馃檪

All 4 comments

npm install animate.css --save doesn't work either.
I'm working on an app with gatsby.js though, so importing using the cdn isn't possible.

Hey @Draichi/@alishaevn! You should be able to include animate.css on your page by require or importing it. For example, in Gatsby, you can import Animate.css in gatsby-browser.js to include it on every page, and then add the class names to elements:

// In gatsby-browser.js
import "animate.css"
// In src/pages/index.js
<h1 className="animate__animated animate__zoomInDown">Animated heading</h1>

Here鈥檚 a working example, set up by running npx gatsby new animate-css-test and inside the project yarn add animate.css:

Would it be worth mentioning this in the docs? They do kind of imply that running yarn add or npm install will be all you need to do 馃檪

~nextjs after adding import 'animate.css' still doesn't work :(~

nvm, its working...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ivalsaraj picture ivalsaraj  路  3Comments

JustinWestphal picture JustinWestphal  路  5Comments

samuel-fonseca picture samuel-fonseca  路  3Comments

kosvrouvas picture kosvrouvas  路  5Comments

bedo2991 picture bedo2991  路  3Comments