Enter animations control how elements appear on screen. AddingDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/jamiebuilds/tailwindcss-animate/llms.txt
Use this file to discover all available pages before exploring further.
animate-in to an element runs the enter keyframe animation, which reads from a set of CSS custom properties—--tw-enter-opacity, --tw-enter-scale, --tw-enter-rotate, --tw-enter-translate-x, and --tw-enter-translate-y—to determine the element’s starting state. You compose the animation by pairing animate-in with one or more modifier utilities like fade-in, zoom-in, spin-in, and slide-in-from-{direction}, each of which sets the relevant custom property.
The animate-in class
| Class | Properties |
|---|---|
animate-in | animation-name: enter; animation-duration: 150ms; --tw-enter-opacity: initial; --tw-enter-scale: initial; --tw-enter-rotate: initial; --tw-enter-translate-x: initial; --tw-enter-translate-y: initial; |
Fade in
fade-in-{amount} sets --tw-enter-opacity to control the opacity at the start of the animation. The element fades from the given opacity to its natural opacity. Using fade-in without an amount defaults to opacity 0, so the element starts fully transparent.
| Class | Properties |
|---|---|
fade-in | --tw-enter-opacity: 0; |
fade-in-0 | --tw-enter-opacity: 0; |
fade-in-5 | --tw-enter-opacity: 0.05; |
fade-in-10 | --tw-enter-opacity: 0.1; |
fade-in-20 | --tw-enter-opacity: 0.2; |
fade-in-25 | --tw-enter-opacity: 0.25; |
fade-in-30 | --tw-enter-opacity: 0.3; |
fade-in-40 | --tw-enter-opacity: 0.4; |
fade-in-50 | --tw-enter-opacity: 0.5; |
fade-in-60 | --tw-enter-opacity: 0.6; |
fade-in-70 | --tw-enter-opacity: 0.7; |
fade-in-75 | --tw-enter-opacity: 0.75; |
fade-in-80 | --tw-enter-opacity: 0.8; |
fade-in-90 | --tw-enter-opacity: 0.9; |
fade-in-95 | --tw-enter-opacity: 0.95; |
fade-in-100 | --tw-enter-opacity: 1; |
Zoom in
zoom-in-{amount} sets --tw-enter-scale to control the scale at the start of the animation. The element grows from the given scale to its natural size. Using zoom-in without an amount defaults to scale 0, so the element starts invisible.
| Class | Properties |
|---|---|
zoom-in | --tw-enter-scale: 0; |
zoom-in-0 | --tw-enter-scale: 0; |
zoom-in-50 | --tw-enter-scale: .5; |
zoom-in-90 | --tw-enter-scale: .9; |
zoom-in-95 | --tw-enter-scale: .95; |
zoom-in-100 | --tw-enter-scale: 1; |
zoom-in-105 | --tw-enter-scale: 1.05; |
zoom-in-110 | --tw-enter-scale: 1.1; |
zoom-in-125 | --tw-enter-scale: 1.25; |
zoom-in-150 | --tw-enter-scale: 1.5; |
Spin in
spin-in-{amount} sets --tw-enter-rotate to control the rotation at the start of the animation. The element rotates from the given angle to its natural (zero-rotation) position. Using spin-in without an amount defaults to 30deg.
| Class | Properties |
|---|---|
spin-in | --tw-enter-rotate: 30deg; |
spin-in-0 | --tw-enter-rotate: 0deg; |
spin-in-1 | --tw-enter-rotate: 1deg; |
spin-in-2 | --tw-enter-rotate: 2deg; |
spin-in-3 | --tw-enter-rotate: 3deg; |
spin-in-6 | --tw-enter-rotate: 6deg; |
spin-in-12 | --tw-enter-rotate: 12deg; |
spin-in-45 | --tw-enter-rotate: 45deg; |
spin-in-90 | --tw-enter-rotate: 90deg; |
spin-in-180 | --tw-enter-rotate: 180deg; |
Slide in
slide-in-from-{direction}-{amount} sets --tw-enter-translate-x or --tw-enter-translate-y to control where an element slides in from. The element moves from the offset position to its natural position. Using a direction without an amount defaults to 100% of the element’s dimension.
slide-in-from-topandslide-in-from-bottomset--tw-enter-translate-yslide-in-from-leftandslide-in-from-rightset--tw-enter-translate-x
The translate scale draws from Tailwind’s full
translate theme, including fractional values like slide-in-from-top-1/2 (50%) and pixel values like slide-in-from-left-px (1px). Use arbitrary values like slide-in-from-left-[17rem] for one-off distances.Combining effects
Because each modifier utility sets a different CSS custom property, you can combine multiple enter utilities on the same element. All combined effects run simultaneously as part of the sameanimate-in animation.
You can combine effects that target different properties (opacity, scale, rotation, translation), but applying two utilities that set the same property — for example
fade-in-25 and fade-in-50 — will result in one overriding the other.Conditional application
All enter utilities support Tailwind’s variant modifiers, so you can apply them conditionally based on state, breakpoint, or media query.Hover, focus, and other states
Usehover:animate-in to trigger the enter animation only on hover, or pair a state modifier with a specific modifier utility to adjust an animation parameter.
Breakpoints and media queries
Use responsive prefixes to apply enter animations at specific screen sizes:motion-safe:animate-in to respect the user’s reduced motion preference: