CSS Animation Generator
Build CSS animations with live preview. Choose from 16 presets, edit keyframes per-stop, generate hover transitions and loading spinners — copy CSS, Tailwind or @keyframes instantly.
How to use
Pick a preset
Choose from 16 built-in animations — Fade, Slide, Zoom, Rotate, Bounce, Pulse, Shake, Flash, Spinner and Skeleton Loader. The preview plays instantly and all controls update to match the preset.
Tweak controls
Adjust duration, delay, timing function, iteration count, direction and fill-mode in the Controls tab. The shorthand preview at the bottom shows you the final animation property value in real time.
Fine-tune keyframes
Switch to Keyframe Editor to control opacity, translateX/Y, scale, rotate and skew at each stop (0%, 25%, 50%, 75%, 100%). Toggle which stops are included in the output. Hit Replay to preview the result.
Generate hover or loading code
Use the Hover tab to pick a hover transition effect (scale, lift, glow, etc.) and set the duration. Use the Loading tab for spinner, dots, pulse or bars animations — choose color and speed.
Copy the output you need
Switch between Full CSS, @keyframes only, animation shorthand, or Tailwind config output. Copy with one click and paste into your project.
What CSS animations are used for
Page entrance effects
Fade In, Slide Up and Zoom In give content a polished appearance as it enters the viewport. Triggered with Intersection Observer, they create a smooth, professional reveal effect.
Loading states
Spinner, dots, pulse and bar animations communicate that content is loading. CSS-only loaders are lightweight, accessible and work without JavaScript.
Interactive feedback
Hover transitions (scale, lift, glow) give users tactile feedback that an element is interactive. Subtle, short animations (0.15–0.25s) improve perceived responsiveness without being distracting.
Attention & emphasis
Pulse, bounce and shake animations draw attention to important elements — a call-to-action button, a notification badge, or a form validation error.
Skeleton loading UI
Skeleton screens use shimmer animations to show placeholder shapes while content loads — dramatically improving perceived performance compared to a blank screen or spinner.
Exit animations
Fade Out, Zoom Out and Rotate Out create graceful exit transitions before an element is removed. Use fill-mode: forwards so the element stays invisible after the animation ends.
How it works
Preset library
Each of the 16 presets stores a set of keyframe stops with pre-computed opacity, translate, scale, rotate and skew values. Selecting a preset populates all five stop editors so you can tweak from a working starting point.
Live CSS injection
The preview uses React's dangerouslySetInnerHTML to inject a <style> tag containing the live @keyframes and animation declaration. Changing any control updates the style tag in real time — no page reload, no render delay.
Replay via key prop
Clicking Replay increments a counter that is set as the key prop on the preview element. React unmounts and remounts the element, clearing the animation state and restarting it from 0% — the cleanest way to replay CSS animations in React.
Four output formats
The generator produces full CSS (property + keyframes), @keyframes only, animation shorthand, or a Tailwind config block with the complete keyframes and animation definitions ready to paste into tailwind.config.js.
Related tools
Frequently asked questions
Quick answers about this free online tool.
