Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Animate.css not animating in my Vue 3 project

I'm simply trying to do some basic html animations in my Vue 3 app but the Animate.css examples aren't working.

Specifically, after installing the animate css dependency using npm install animate.css --save the sample animation code <h1 class="animate__animated animate__bounce">An animated element</h1> doesn't animate when my page loads. The header renders but just sits there, motionless.

I've tried other solutions like changing windows performance, adding animated to the class, etc, but it hasn't worked.

I see some solutions use CDN to link the library, but I don't think I should have to do that since I used npm to install it.

What am I doing wrong?

<template>
  <div class="container-fluid" id="app">
    <h1 class="animate__animated animate__bounce" style="color:white">An animated element</h1>
  </div>
</template>
like image 526
Cody Avatar asked Nov 04 '25 03:11

Cody


1 Answers

import animate.css into your main.js file

import 'animate.css';
like image 186
korayguler Avatar answered Nov 05 '25 23:11

korayguler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!