A cross-browser library of CSS animations with ready-to-use, class-based animations for web developers.
npx @tessl/cli install tessl/npm-animate-css@4.1.0Animate.css is a comprehensive CSS animation library providing 97 ready-to-use, cross-browser CSS animations for web developers. It offers animation effects organized into categories like attention seekers, bouncing entrances/exits, fading effects, flippers, lightspeed animations, rotating effects, sliding movements, zooming transitions, and specials.
npm install animate.csshttps://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css@import url('animate.css');<link rel="stylesheet" href="node_modules/animate.css/animate.min.css">import 'animate.css';<!-- V4.x Prefixed API (Recommended) -->
<div class="animate__animated animate__bounce">Bouncing element</div>
<!-- With utility classes -->
<div class="animate__animated animate__fadeIn animate__delay-2s animate__infinite">
Infinite fading in with 2 second delay
</div>
<!-- Legacy API (Compatibility Mode) -->
<div class="animated bounce">Bouncing element</div>.custom-animation {
--animate-duration: 2s;
--animate-delay: 0.5s;
--animate-repeat: 3;
}Animate.css is built around several key components:
.animate__animated class and legacy .animated classprefers-reduced-motion media query supportGlobal CSS variables that control animation behavior across all animations.
:root {
--animate-duration: 1s; /* Default animation duration */
--animate-delay: 1s; /* Default animation delay */
--animate-repeat: 1; /* Default repeat count */
}Required classes that must be applied along with animation classes.
/* V4.x Prefixed API (Recommended) */
.animate__animated { }
/* Legacy API (Compatibility Mode) */
.animated { }Modifier classes for controlling animation timing and repetition.
/* Speed modifiers */
.animate__faster { } /* 0.5x speed (duration / 2) */
.animate__fast { } /* 0.8x speed */
.animate__slow { } /* 2x speed */
.animate__slower { } /* 3x speed */
/* Repeat modifiers */
.animate__infinite { } /* Infinite iterations */
.animate__repeat-1 { } /* Repeat 1x */
.animate__repeat-2 { } /* Repeat 2x */
.animate__repeat-3 { } /* Repeat 3x */
/* Delay modifiers */
.animate__delay-1s { } /* 1 second delay */
.animate__delay-2s { } /* 2 second delay */
.animate__delay-3s { } /* 3 second delay */
.animate__delay-4s { } /* 4 second delay */
.animate__delay-5s { } /* 5 second delay */Animation effects designed to draw attention to elements.
.animate__bounce { } /* Bouncing effect with scale and vertical movement */
.animate__flash { } /* Flashing opacity effect */
.animate__pulse { } /* Simple scaling pulse */
.animate__rubberBand { } /* Rubber band stretch effect */
.animate__shakeX { } /* Horizontal X-axis shaking */
.animate__shakeY { } /* Vertical Y-axis shaking */
.animate__headShake { } /* Head shaking motion */
.animate__swing { } /* Swinging pendulum motion */
.animate__tada { } /* Celebratory tada effect with scale and rotation */
.animate__wobble { } /* Wobbling side-to-side motion */
.animate__jello { } /* Jello-like wobble with skew transforms */
.animate__heartBeat { } /* Pulsing heartbeat effect */Entrance animations with scaling effects from different directions.
.animate__backInDown { } /* Enter from above with scale transform */
.animate__backInLeft { } /* Enter from left with scale transform */
.animate__backInRight { } /* Enter from right with scale transform */
.animate__backInUp { } /* Enter from below with scale transform */Exit animations with scaling effects toward different directions.
.animate__backOutDown { } /* Exit downward with scale transform */
.animate__backOutLeft { } /* Exit left with scale transform */
.animate__backOutRight { } /* Exit right with scale transform */
.animate__backOutUp { } /* Exit upward with scale transform */Bouncing entrance effects from various directions.
.animate__bounceIn { } /* Scale-based bouncing entrance */
.animate__bounceInDown { } /* Bounce in from above */
.animate__bounceInLeft { } /* Bounce in from left */
.animate__bounceInRight { } /* Bounce in from right */
.animate__bounceInUp { } /* Bounce in from below */Bouncing exit effects toward various directions.
.animate__bounceOut { } /* Scale-based bouncing exit */
.animate__bounceOutDown { } /* Bounce out downward */
.animate__bounceOutLeft { } /* Bounce out left */
.animate__bounceOutRight { } /* Bounce out right */
.animate__bounceOutUp { } /* Bounce out upward */Fade-in effects from various directions and diagonals.
.animate__fadeIn { } /* Simple fade in (opacity 0 to 1) */
.animate__fadeInDown { } /* Fade in from above */
.animate__fadeInDownBig { } /* Fade in from far above */
.animate__fadeInLeft { } /* Fade in from left */
.animate__fadeInLeftBig { } /* Fade in from far left */
.animate__fadeInRight { } /* Fade in from right */
.animate__fadeInRightBig { } /* Fade in from far right */
.animate__fadeInUp { } /* Fade in from below */
.animate__fadeInUpBig { } /* Fade in from far below */
.animate__fadeInTopLeft { } /* Fade in from top-left diagonal */
.animate__fadeInTopRight { } /* Fade in from top-right diagonal */
.animate__fadeInBottomLeft { } /* Fade in from bottom-left diagonal */
.animate__fadeInBottomRight { } /* Fade in from bottom-right diagonal */Fade-out effects toward various directions and diagonals.
.animate__fadeOut { } /* Simple fade out (opacity 1 to 0) */
.animate__fadeOutDown { } /* Fade out downward */
.animate__fadeOutDownBig { } /* Fade out far downward */
.animate__fadeOutLeft { } /* Fade out to left */
.animate__fadeOutLeftBig { } /* Fade out far left */
.animate__fadeOutRight { } /* Fade out to right */
.animate__fadeOutRightBig { } /* Fade out far right */
.animate__fadeOutUp { } /* Fade out upward */
.animate__fadeOutUpBig { } /* Fade out far upward */
.animate__fadeOutTopLeft { } /* Fade out to top-left diagonal */
.animate__fadeOutTopRight { } /* Fade out to top-right diagonal */
.animate__fadeOutBottomLeft { } /* Fade out to bottom-left diagonal */
.animate__fadeOutBottomRight { } /* Fade out to bottom-right diagonal */3D flip animations with perspective transforms.
.animate__flip { } /* 3D flip with perspective transform */
.animate__flipInX { } /* Flip in along X-axis (horizontal flip) */
.animate__flipInY { } /* Flip in along Y-axis (vertical flip) */
.animate__flipOutX { } /* Flip out along X-axis */
.animate__flipOutY { } /* Flip out along Y-axis */Fast entrance and exit animations with skew effects.
.animate__lightSpeedInRight { } /* Fast entrance from right with skew */
.animate__lightSpeedInLeft { } /* Fast entrance from left with skew */
.animate__lightSpeedOutRight { } /* Fast exit to right with skew */
.animate__lightSpeedOutLeft { } /* Fast exit to left with skew */Rotation-based entrance animations from various directions.
.animate__rotateIn { } /* Simple rotation entrance (360deg) */
.animate__rotateInDownLeft { } /* Rotate in from down-left */
.animate__rotateInDownRight { } /* Rotate in from down-right */
.animate__rotateInUpLeft { } /* Rotate in from up-left */
.animate__rotateInUpRight { } /* Rotate in from up-right */Rotation-based exit animations toward various directions.
.animate__rotateOut { } /* Simple rotation exit (360deg) */
.animate__rotateOutDownLeft { } /* Rotate out to down-left */
.animate__rotateOutDownRight { } /* Rotate out to down-right */
.animate__rotateOutUpLeft { } /* Rotate out to up-left */
.animate__rotateOutUpRight { } /* Rotate out to up-right */Slide-in animations from different directions.
.animate__slideInDown { } /* Slide in from above */
.animate__slideInLeft { } /* Slide in from left */
.animate__slideInRight { } /* Slide in from right */
.animate__slideInUp { } /* Slide in from below */Slide-out animations toward different directions.
.animate__slideOutDown { } /* Slide out downward */
.animate__slideOutLeft { } /* Slide out to left */
.animate__slideOutRight { } /* Slide out to right */
.animate__slideOutUp { } /* Slide out upward */Unique, special-purpose animations with complex effects.
.animate__hinge { } /* Door hinge effect with rotation and gravity fall (2x duration) */
.animate__jackInTheBox { } /* Jack-in-the-box surprise pop effect */
.animate__rollIn { } /* Rolling entrance with rotation and translation */
.animate__rollOut { } /* Rolling exit with rotation and translation */Scale-based entrance animations from various directions.
.animate__zoomIn { } /* Simple zoom in with scale transform */
.animate__zoomInDown { } /* Zoom in from above */
.animate__zoomInLeft { } /* Zoom in from left */
.animate__zoomInRight { } /* Zoom in from right */
.animate__zoomInUp { } /* Zoom in from below */Scale-based exit animations toward various directions.
.animate__zoomOut { } /* Simple zoom out with scale transform */
.animate__zoomOutDown { } /* Zoom out downward */
.animate__zoomOutLeft { } /* Zoom out to left */
.animate__zoomOutRight { } /* Zoom out to right */
.animate__zoomOutUp { } /* Zoom out upward */Animate.css provides three different build variants:
Animate.css automatically supports the prefers-reduced-motion media query for users with motion sensitivity. When motion is reduced:
opacity: 0 instead of complex transformsAll animations are available in both prefixed (v4.x) and unprefixed (legacy) formats:
<!-- V4.x Prefixed (Recommended) -->
<div class="animate__animated animate__fadeIn">Content</div>
<!-- Legacy/Compatibility -->
<div class="animated fadeIn">Content</div>