CSS Animation Generator
0.6s
0s
Element
Speed
Preview
.element {
  animation: fade-in 0.6s ease 0s 1 normal forwards;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

CSS Keyframe Animation Generator — 79 Animation Presets

Updated May 24, 2026
Share & Support

What's included

Features

79 CSS keyframe animation presets — fade, slide, bounce, flip, zoom, glitch, neon flicker, cinematic, shockwave, and more
Search bar to filter presets by name; star any animation to pin it to a persistent Favorites section
Duration and delay controls in seconds with decimal precision
Easing selector — ease, linear, ease-in/out, ease-in-out, plus visual cubic-bezier curve editor with draggable handles; fine-tune timing with our CSS Easing Generator
Fill-mode, direction, and iteration count controls — covers every animation property
Preview element picker — box, button, text paragraph, or card UI element
Slow-motion preview at ¼× and ½× speed; dark background toggle for neon and glow effects; Stagger×3 shows three elements with cascading delays
Edit @keyframes tab — editable textarea with live preview updates; reset to preset with one click
Export as CSS @keyframes + animation property, Tailwind tailwind.config.js snippet, or React inline style; animate SVG icons with our SVG Animation Generator
Download as .css, .js, or .jsx file; 100% client-side — no data sent to any server; build loaders with our CSS Loader Generator

About this tool

Pick a CSS Animation, Tweak the Settings, Copy the @keyframes Code

Runs in your browser
No install or signup
Free forever

Writing @keyframes by hand and tweaking timing, easing, and fill-mode in DevTools is slow. This tool gives you 79 ready-made animation presets — click one, adjust the controls, watch it preview live, and copy the complete CSS block in one click.

Every animation exposes the full set of CSS animation properties: duration, delay, easing (ease, linear, ease-in/out, or a custom cubic-bezier curve you design in the visual editor), fill-mode (none, forwards, backwards, both), direction (normal, reverse, alternate, alternate-reverse), and iteration count (any number or infinite). The preview replays whenever you change a setting — or click Replay to restart manually.

The 79 presets span entrances, exits, attention-seekers, and ambient effects: fade in/out, slide (6 directions), bounce (in/out), scale (up/down), flip (4 axes), zoom (in, in-down, in-left, in-right), shake, pulse, glitch, neon-pulse, neon-flicker, rubber-band, jello, wobble, swing, heartbeat, float, levitate, orbit, spiral, vortex, cinematic, spotlight, crash-in, ricochet, shockwave, door-open, peel, wipe-right, and more. Export as raw CSS @keyframes + animation property, a Tailwind tailwind.config.js snippet with theme.extend.keyframes and theme.extend.animation entries, or a React inline-style snippet.

Step by step

How to Use

  1. 1
    Search and pick an animation presetType in the search box at the top of the sidebar to filter the 79 presets by name, or scroll and click any preset to load it. Star any animation with the ☆ icon to pin it to your Favorites section at the top — favorites are saved across sessions.
  2. 2
    Set Duration and DelayUse the Duration slider to control how long one cycle takes — 0.2–0.4s for snappy UI feedback, 0.8–1.2s for ambient loops. Set Delay if you want the animation to pause before starting, useful when timing sequences across multiple elements.
  3. 3
    Choose an Easing functionPick from ease, linear, ease-in, ease-out, or ease-in-out. For a custom timing curve, click the cubic-bezier button to open the visual Bezier editor — drag the two control handles to shape the curve and see the generated cubic-bezier() value update live.
  4. 4
    Configure Fill Mode, Direction, and IterationsSet Fill Mode to "forwards" for entrance animations so the element stays visible after finishing. Set Direction to "alternate" and Iterations to "infinite" for natural back-and-forth ambient loops like float, pulse, or sway. Use a finite iteration count (2–3) for attention animations like shake or heartbeat.
  5. 5
    Preview with element picker, slow-motion, stagger, and dark backgroundSwitch the preview element between box, button, text, and card to see the animation on something closer to your real UI. Toggle ¼× or ½× speed to study the easing curve in slow motion. Enable Stagger×3 to see three elements animate with increasing delays — the most common real-world usage pattern. Toggle Dark BG to check neon, glow, and spotlight animations on a dark background.
  6. 6
    Edit the @keyframes directlyClick the Edit KF tab in the code area to open an editable textarea seeded with the current @keyframes block. Modify any percentage stop, property, or value — the live preview updates immediately and the export uses your custom keyframes. Resets automatically when you switch to a different preset.
  7. 7
    Copy or download the outputSwitch between the CSS, Tailwind, and React export tabs. CSS gives the @keyframes block plus the animation shorthand property. Tailwind gives a tailwind.config.js snippet with theme.extend.keyframes and an animate-* class ready to use. React gives the animation as an inline style string plus the keyframes to paste into a global stylesheet. Click Copy to copy to clipboard, or ↓ DL to download as a .css, .js, or .jsx file.

Real-world uses

Common Use Cases

Animate a modal, toast, or dropdown entrance
Pick slideInUp or fadeIn, set duration to 0.2–0.3s, fill-mode to forwards. The element appears smoothly rather than snapping in abruptly. Copy the CSS and apply the class when the element mounts. Add glassmorphism styling to the modal with our Glassmorphism Generator.
Reveal elements as the user scrolls
Generate the CSS for a fadeIn or slideInUp with fill-mode: forwards — so elements stay visible after the animation ends. Trigger the class via IntersectionObserver or a CSS scroll-driven animation when the element enters the viewport.
Create a loading spinner or skeleton shimmer
Use spin or pulse with animation-iteration-count: infinite. Duration of 0.8–1.2s creates a natural loading rhythm. Copy the CSS and apply it to any spinner icon or skeleton element.
Draw attention to an error state or notification badge
Shake works for form validation errors. Flash or heartbeat works for badges and alerts. Set iterations to 2–3 rather than infinite — enough to catch attention without being annoying.
Add personality to empty states or landing page illustrations
Apply bounce or swing to an SVG icon with direction: alternate and iteration: infinite for a natural back-and-forth oscillation. The alternate direction avoids the jarring jump of a standard looping animation. Use our Animated SVG Icons collection for ready-made animated icon options.
Get a Tailwind animation class or React snippet without writing @keyframes
The Tailwind tab generates the animation as an arbitrary value class for direct use in className. The React tab generates a complete JSX snippet with the @keyframes block embedded in a style tag — paste into any component.

Got questions?

Frequently Asked Questions

Pick an animation preset, adjust the duration, easing, fill-mode, direction, and iterations, then copy the CSS tab output. It includes the @keyframes block and the animation property — paste both into your stylesheet and apply the generated class name to any element. No JavaScript required.

"forwards" is the most common value — it holds the final keyframe state after the animation ends, so an entrance animation like fadeIn leaves the element visible. "none" (default) snaps back to the original style when done, which causes entrance animations to disappear immediately. "backwards" applies the first keyframe state during the delay period. "both" combines forwards and backwards.

Set the iteration count to "infinite" in the Iterations control. The exported CSS uses animation-iteration-count: infinite. Use direction: alternate for effects like pulse or bounce to create a back-and-forth oscillation rather than a jarring loop restart.

Generate the animation CSS with fill-mode: forwards so the element stays in its end state after the animation completes. Initially set the element's visibility: hidden or opacity: 0. Add the animation class via an IntersectionObserver callback when the element enters the viewport. The element will animate in and remain visible.

ease (default) starts and ends slowly with a fast middle. ease-in starts slowly and accelerates — feels like it's gaining momentum, good for exit animations. ease-out starts fast and decelerates — feels like it's settling in, good for entrance animations (elements feel like they slide into place). ease-in-out is slow at both ends.

Switch to the React tab. The output includes the @keyframes block inside a <style> JSX tag and the animation applied via a className with a scoped auto-generated name. Copy and paste into any React component.

Copy the generated CSS and apply the animation property only in the :hover selector of your element: .element:hover { animation: fadeIn 0.3s ease forwards; }. The animation triggers when the cursor enters the element. Set fill-mode to none so it resets when the cursor leaves.

animation-direction controls whether each cycle plays forward or backward. "normal" (default) plays forward every cycle. "reverse" plays backward every cycle. "alternate" plays forward on odd cycles and backward on even cycles — this creates a natural oscillation for effects like pulse, bounce, and swing without a jarring jump back to the start state. "alternate-reverse" starts in reverse. For looping ambient animations (a floating icon, a breathing glow, a bouncing badge), direction: alternate with iteration-count: infinite produces the most natural-looking result.

Staggered animations use different animation-delay values for each element. Generate the base animation CSS here, then apply it to each element with an increasing delay: the first gets delay: 0s, the second delay: 0.1s, the third delay: 0.2s, and so on. Use CSS custom properties to make this scalable: --i: 0, --i: 1, --i: 2 on each element, then animation-delay: calc(var(--i) * 0.1s). Set fill-mode: backwards so each element stays hidden during its delay period — otherwise all elements will briefly show at their final state before animating.

Easing controls how the animation progresses through its keyframes over time — it sets the acceleration curve. "ease" starts slow, speeds up, then slows down at the end — a natural feel for most UI motion. "linear" moves at a constant rate the entire time — good for spinners and continuous rotation. "ease-in" starts slow and accelerates — suitable for exit animations where elements leave the screen. "ease-out" starts fast and decelerates — best for entrance animations where elements arrive and settle. "ease-in-out" is slow at both ends — ideal for elements that move across the screen from one position to another. For custom curves, use cubic-bezier(x1, y1, x2, y2).

Switch to the Tailwind tab in the export panel. The output uses Tailwind's arbitrary value syntax for the animation property: className="[animation:fadeIn_0.5s_ease_forwards]". The @keyframes block still needs to be added to your global CSS — paste it into your globals.css or tailwind.css file. For animations you use frequently, add them to tailwind.config.js under theme.extend.keyframes and theme.extend.animation — then you can use the named class like animate-fadeIn instead of an arbitrary value.

Transitions are simpler and better for state changes triggered by interaction — hover, focus, active. They interpolate between two states (before and after) automatically when the property changes. Animations with @keyframes are better for sequences that run on load, scroll triggers, or need multiple steps between start and end — like a bounce that overshoots, a shake with multiple oscillations, or a multi-step entrance that fades in and slides up simultaneously. Transitions require a state change to trigger; animations can start automatically and repeat independently of user interaction.