Skip to content

Animation ​

Utilities for applying various animations to elements.

Class NameCSS Equivalent
animate-forwardsanimation-fill-mode: forwards
animate-backwardsanimation-fill-mode: backwards
animate-bothanimation-fill-mode: both
animate-infiniteanimation-iteration-count: infinite
animate-1animation-iteration-count: 1
animate-2animation-iteration-count: 2
animate-normalanimation-direction: normal
animate-reverseanimation-direction: reverse
animate-alternateanimation-direction: alternate
animate-alternate-reverseanimation-direction: alternate-reverse
animate-rotate-bottom-leftanimation-name: rotate-bottom-left
animate-rotate-vertical-centeranimation-name: rotate-vertical-center
animate-rotate-diagonal-bottom-rightanimation-name: rotate-diagonal-bottom-right
animate-rotate-topanimation-name: rotate-top
animate-rotate-leftanimation-name: rotate-left
animate-rotate-vertical-leftanimation-name: rotate-vertical-left
animate-rotate-diagonal-bottom-leftanimation-name: rotate-diagonal-bottom-left
animate-rotate-top-rightanimation-name: rotate-top-right
animate-rotate-top-leftanimation-name: rotate-top-left
animate-rotate-vertical-rightanimation-name: rotate-vertical-right
animate-rotate-diagonal-top-leftanimation-name: rotate-diagonal-top-left
animate-rotate-rightanimation-name: rotate-right
animate-rotate-horizontal-centeranimation-name: rotate-horizontal-center
animate-rotate-diagonal-1animation-name: rotate-diagonal-1
animate-rotate-horizontal-topanimation-name: rotate-horizontal-top
animate-rotate-diagonal-top-rightanimation-name: rotate-diagonal-top-right
animate-rotate-diagonal-2animation-name: rotate-diagonal-2
animate-rotate-horizontal-bottomanimation-name: rotate-horizontal-bottom
animate-rotate-bottomanimation-name: rotate-bottom
animate-rotate-bottom-rightanimation-name: rotate-bottom-right
animate-rotate-centeranimation-name: rotate-center
animate-scale-down-centeranimation-name: scale-down-center
animate-scale-down-bottom-leftanimation-name: scale-down-bottom-left
animate-scale-down-vertical-centeranimation-name: scale-down-vertical-center
animate-scale-down-topanimation-name: scale-down-top
animate-scale-down-leftanimation-name: scale-down-left
animate-scale-down-vertical-topanimation-name: scale-down-vertical-top
animate-scale-down-top-rightanimation-name: scale-down-top-right
animate-scale-down-top-leftanimation-name: scale-down-top-left
animate-scale-down-vertical-bottomanimation-name: scale-down-vertical-bottom
animate-scale-down-rightanimation-name: scale-down-right
animate-scale-down-horizontal-centeranimation-name: scale-down-horizontal-center
animate-scale-down-bottom-rightanimation-name: scale-down-bottom-right
animate-scale-down-horizontal-leftanimation-name: scale-down-horizontal-left
animate-scale-down-bottomanimation-name: scale-down-bottom
animate-scale-down-horizontal-rightanimation-name: scale-down-horizontal-right
animate-scale-up-centeranimation-name: scale-up-center
animate-scale-up-bottom-leftanimation-name: scale-up-bottom-left
animate-scale-up-vertical-centeranimation-name: scale-up-vertical-center
animate-scale-up-topanimation-name: scale-up-top
animate-scale-up-leftanimation-name: scale-up-left
animate-scale-up-vertical-topanimation-name: scale-up-vertical-top
animate-scale-up-top-rightanimation-name: scale-up-top-right
animate-scale-up-top-leftanimation-name: scale-up-top-left
animate-scale-up-vertical-bottomanimation-name: scale-up-vertical-bottom
animate-scale-up-rightanimation-name: scale-up-right
animate-scale-up-horizontal-centeranimation-name: scale-up-horizontal-center
animate-scale-up-bottom-rightanimation-name: scale-up-bottom-right
animate-scale-up-horizontal-leftanimation-name: scale-up-horizontal-left
animate-scale-up-bottomanimation-name: scale-up-bottom
animate-scale-up-horizontal-rightanimation-name: scale-up-horizontal-right
animate-swing-top-fwdanimation-name: swing-top-fwd
animate-swing-bottom-right-fwdanimation-name: swing-bottom-right-fwd
animate-swing-top-right-fwdanimation-name: swing-top-right-fwd
animate-shake-horizontalanimation-name: shake-horizontal
animate-shake-bottom-rightanimation-name: shake-bottom-right
animate-shake-verticalanimation-name: shake-vertical
animate-shake-bottomanimation-name: shake-bottom
animate-shake-left-rightanimation-name: shake-left-right
animate-shake-bottom-leftanimation-name: shake-bottom-left
animate-shake-topanimation-name: shake-top
animate-shake-leftanimation-name: shake-left
animate-shake-top-rightanimation-name: shake-top-right
animate-shake-top-leftanimation-name: shake-top-left
animate-shake-rightanimation-name: shake-right
animate-jello-horizontalanimation-name: jello-horizontal
animate-jello-verticalanimation-name: jello-vertical
animate-jello-diagonal-1animation-name: jello-diagonal-1
animate-jello-diagonal-2animation-name: jello-diagonal-2

Applying Animation ​

Applying animation is as easy as adding the corresponding animation class to the element.

html
<div class="[...] animate-rotate-bottom-left">...</div>

Animation Options ​

By defining extra options, you can fine-tune the animation. You can control duration, delay, easing, direction, iteration-count and fill-mode.

Animation Direction ​

Use animate-{direction} classes to apply direction to the animation.

html
<div class="[...] animate-alternate hover:animate-rotate-bottom-left">...</div>

Animation Direction ​

Use animate-{direction} classes to apply direction to the animation.

html
<div class="[...] animate-alternate hover:animate-rotate-bottom-left">...</div>

Animation Iteration Count ​

Use animate-{count} classes to apply an iteration count to the animation.

html
<div class="[...] animate-infinite hover:animate-rotate-bottom-left">...</div>
<div class="[...] animate-2 hover:animate-rotate-bottom-left">...</div>

Animation Fill Mode ​

Use animate-{mode} classes to apply a fill mode to the animation.

html
<div class="[...] animate-backwards hover:animate-rotate-bottom-left">...</div>
<div class="[...] animate-forwards hover:animate-rotate-bottom-left">...</div>

Animation Duration ​

Apply animation duration to elements by adding the corresponding duration utility class. You can apply exact the same classes as for transition durations.

INFO

See /Styles/Utilities/Transitions & Animations/Transition Duration for a full list of duration classes.

html
<div class="[...] animate-infinite duration-extra-long-5 hover:animate-rotate-bottom-left">...</div>

Animation Easing ​

Apply animation easing to elements by adding the corresponding easing utility class.

INFO

See /Styles/Utilities/Transitions & Animations/Transition Ease for a full list of duration classes.

html
<div class="[...] animate-infinite ease-emphasized-decelarate hover:animate-rotate-bottom-left">...</div>

Animation Delay ​

Apply animation delay to elements by adding the corresponding delay utility class. You can apply exact the same classes as for transition delays.

INFO

See /Styles/Utilities/Transitions & Animations/Transition Delay for a full list of delay classes.

html
<div class="[...] animate-infinite delay-extra-long-5 hover:animate-rotate-bottom-left">...</div>

Rotate ​

Click to activate the animations
animate-rotate-bottom-left
animate-rotate-vertical-center
animate-rotate-diagonal-bottom-right
animate-rotate-top
animate-rotate-left
animate-rotate-vertical-left
animate-rotate-diagonal-bottom-left
animate-rotate-top-right
animate-rotate-top-left
animate-rotate-vertical-right
animate-rotate-diagonal-top-left
animate-rotate-right
animate-rotate-horizontal-center
animate-rotate-diagonal-1
animate-rotate-horizontal-top
animate-rotate-diagonal-top-right
animate-rotate-diagonal-2
animate-rotate-horizontal-bottom
animate-rotate-bottom
animate-rotate-bottom-right
animate-rotate-center

Scale Down ​

Click to activate the animations
animate-scale-down-center
animate-scale-down-bottom-left
animate-scale-down-vertical-center
animate-scale-down-top
animate-scale-down-left
animate-scale-down-vertical-top
animate-scale-down-top-right
animate-scale-down-top-left
animate-scale-down-vertical-bottom
animate-scale-down-right
animate-scale-down-horizontal-center
animate-scale-down-bottom-right
animate-scale-down-horizontal-left
animate-scale-down-bottom
animate-scale-down-horizontal-right

Scale Up ​

Click to activate the animations
animate-scale-up-center
animate-scale-up-bottom-left
animate-scale-up-vertical-center
animate-scale-up-top
animate-scale-up-left
animate-scale-up-vertical-top
animate-scale-up-top-right
animate-scale-up-top-left
animate-scale-up-vertical-bottom
animate-scale-up-right
animate-scale-up-horizontal-center
animate-scale-up-bottom-right
animate-scale-up-horizontal-left
animate-scale-up-bottom
animate-scale-up-horizontal-right
animate-swing-top-fwd
animate-swing-bottom-right-fwd
animate-swing-top-right-fwd

Swing ​

Click to activate the animations
animate-swing-top-fwd
animate-swing-bottom-right-fwd
animate-swing-top-right-fwd

Shake ​

Click to activate the animations
animate-shake-horizontal
animate-shake-bottom-right
animate-shake-vertical
animate-shake-bottom
animate-shake-left-right
animate-shake-bottom-left
animate-shake-top
animate-shake-left
animate-shake-top-right
animate-shake-top-left
animate-shake-right

Jello ​

Click to activate the animations
animate-jello-horizontal
animate-jello-vertical
animate-jello-diagonal-1
animate-jello-diagonal-2