Build, preview, and export production-ready CSS animations in seconds. Choose from 25+ keyframe presets, fine-tune timing functions, delays, iterations, and direction — or write your own custom keyframes — all with a real-time visual preview.
CSS animations bring websites to life — they guide attention, communicate feedback, and create delight. This generator transforms complex keyframe syntax into an intuitive visual workflow. Whether you're building micro-interactions for a dashboard or crafting a hero section's entrance, the right animation can elevate user experience from functional to memorable.
CSS animations are built from two core pieces: keyframes (defining states) and animation properties (controlling timing, repetition, and direction).
ease-in vs. ease-out and understand the physics behind each.
At its core, a CSS animation is defined by two things: a set of keyframes that describe the intermediate states of the animation, and a set of animation properties that control how the animation plays. The @keyframes rule specifies the name of the animation and the styles at various points (0%, 50%, 100%, or using from and to). The animation properties — animation-name, animation-duration, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, and animation-fill-mode — give you fine-grained control over the playback.
The easing function (or timing function) defines the rate of change of the animation over time. A linear easing progresses at a constant speed, while an ease-in starts slowly and accelerates — mimicking the feel of a physical object starting from rest. The cubic-bezier() function allows you to design custom acceleration curves, giving you precise control over the motion's character.
| Preset | Motion Type | Best Used For | Keyframe Pattern |
|---|---|---|---|
| Pulse | Scale oscillation | Buttons, notifications, attention-seeking | scale(1) ↔ scale(1.12) |
| Bounce | Vertical spring | Loading states, playful interactions | translateY(0) ↔ translateY(-30px) |
| Fade | Opacity transition | Entrances, exits, subtle hints | opacity: 1 ↔ 0.15 |
| Slide | Directional translation | Menu reveals, carousel items, tooltips | translateX/Y(±30px) ↔ 0 |
| Rotate | Spinning motion | Loading spinners, gear icons, hover effects | rotate(0deg) ↔ rotate(360deg) |
| Scale | Zoom in/out | Modal popups, image galleries, emphasis | scale(0.7) ↔ scale(1.2) |
| Flip | 3D perspective flip | Card flips, product rotations, reveal effects | rotateX/Y(0deg) ↔ 180deg ↔ 360deg |
| Wobble / Swing | Rotational oscillation | Fun, whimsical elements, retro feel | rotate(-6deg) ↔ 0 ↔ 6deg |
| Shake / Tada | Combined translations & rotations | Error states, celebration, emphasis | translateX(±12px) + rotate(±6deg) |
| Heartbeat | Pulsing scale with rhythm | Like buttons, health indicators, attention | scale(1) → 1.25 → 1 → 1.18 → 1 |
| Float / Sink | Gentle vertical drift | Background elements, clouds, ambient motion | translateY(0) ↔ ±20px |
| Glitch | Stuttering displacement | Retro, cyberpunk, error aesthetics | translate(±6px, ±4px) with steps |
| Elastic | Springy scale | Fun loaders, playful interactions | scale(1) → 1.3 → 0.9 → 1.05 → 1 |
| Rubber Band | Stretch & squash | Creative effects, organic feel | scale(1) → (1.25,0.75) → (0.75,1.25) → ... |
| Flash | Blinking opacity | Attention, alerts | opacity: 1 ↔ 0 |
| Hinge | Rotational drop | Dismissal, exit animations | rotate(0) → rotate(80deg) → translateY(300px) |
A project management tool needed to improve user engagement on its task board. By adding a subtle pulse animation to the "Add Task" button, new users were 34% more likely to click it within their first session. The animation used a cubic-bezier(0.25, 0.1, 0.25, 1) easing with a 1.2s duration and infinite iteration. The team also applied a slide-up entrance for newly created tasks, reducing perceived latency and making the interface feel more responsive. This generator allowed the team to prototype and test five different animation styles in under 10 minutes — a process that would have taken hours with manual coding.
prefers-reduced-motion media query to reduce or disable animations for users who experience motion sensitivity. This is a crucial accessibility consideration.
will-change wisely: Apply will-change: transform or will-change: opacity to elements you're animating to hint the browser about upcoming changes, improving performance on complex pages.
transition is often more appropriate than full keyframe animations. Use keyframes for continuous or complex multi-step motions.
transform and opacity uses the GPU compositor thread, making them very performant. Avoid animating width, height, or margin as they trigger layout recalculations.
transition property is simpler and more performant. Keyframes are best for complex, multi-step, or continuous animations.
Research in human-computer interaction shows that motion design directly influences user perception of system responsiveness and quality. Animations that mimic real-world physics — with acceleration, deceleration, and momentum — feel more intuitive and trustworthy. This is why easing functions are so critical: they map abstract motion to physical analogies. For instance, ease-out feels like an object coming to a stop (deceleration), while ease-in feels like an object starting from rest (acceleration). The cubic-bezier function lets you design custom curves that match the exact feel of your brand — from snappy and energetic to smooth and luxurious.
The Euler line of animation? There isn't one, but the twelve principles of animation from Disney — including squash and stretch, anticipation, and follow-through — are directly applicable to web animation. Our presets like "bounce" and "heartbeat" are inspired by these principles, bringing a sense of life and personality to otherwise static interfaces.
The prefers-reduced-motion media query is your most important accessibility tool for animations. Wrap your animations in a conditional that disables or reduces motion for users who opt out. Example:
@media (prefers-reduced-motion: reduce) {
.animated-element {
animation: none !important;
transition: none !important;
}
}
This ensures that your delightful animations don't become a barrier for users with vestibular disorders or other motion sensitivities.
transition is used for simple state changes (e.g., hover, focus) and requires a trigger. animation with @keyframes is more powerful — it can run automatically, loop, and define complex multi-step motion without user interaction.
transform and opacity whenever possible. These are compositor-only properties and run on the GPU. Avoid animating width, height, top, left, margin, or padding as they trigger layout and paint operations.
@media (prefers-reduced-motion: reduce) fallback.
steps(n) divides the animation into n equal intervals, creating a frame-by-frame or "stepped" motion. This is perfect for sprite animations, typewriter effects, or retro pixel-art transitions.
animation-iteration-count: 1 instead of infinite.