# CSS Animation Generator

> Build CSS @keyframes animations visually. Pick a preset or design your own — duration, easing, iteration. Live preview, CSS + Tailwind output.

- URL: https://generate.now/animation
- Category: color
- Price: free, no account required
- AI-powered: no
- Last updated: 2026-08-27

## What it does

A focused CSS animation builder. Pick from a library of common presets (fade in, slide, bounce, spin, pulse, shake) or tune duration, easing, delay, direction, and iteration count from scratch. Live preview reflects every change. Copy the result as CSS @keyframes + class, or as a Tailwind arbitrary value.

## When to use it

- Add a subtle fade-in to a hero section without writing keyframes
- Get the right easing curve for a hover effect
- Translate an animate.css class into clean inline CSS
- Pick a duration that feels snappy, not sluggish (≤250ms for most UI)

## Examples

### Preset: fade-in-up, 400ms, ease-out

```
@keyframes fadeInUp { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: none; } }
```

The most-used entrance animation.

### Preset: pulse, 1.6s, ease-in-out, infinite

```
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
```

Live-indicator-style pulse, runs forever.

### Preset: slide-in-left, 300ms, ease-out

```
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
```

Composited properties only, so it stays smooth on low-end devices.

### Reduced-motion-safe wrapper

```
@media (prefers-reduced-motion: no-preference) { .fade-in-up { animation: fadeInUp 400ms ease-out both; } }
```

The animation only applies when the user hasn't asked for less motion.

## Frequently asked questions

### How long should a UI animation last?

Most UI interactions sit between 150ms and 350ms. Anything under 100ms feels instant (and easy to miss); anything over 500ms starts to feel sluggish. Entrance and dramatic effects can go longer.

### Which easing should I use?

ease-out for things that enter the screen (decelerates into place). ease-in for things that leave. ease-in-out for loops. Linear only for indeterminate progress and continuous motion.

### Why no animate.css-style class name?

You can wrap the generated keyframes in any class name you like — the tool keeps the keyframe name and class name editable. For Tailwind, the arbitrary-value output bundles everything into a single class.

### Which properties are cheap to animate?

transform and opacity. Both are handled by the compositor, so they don't trigger layout or paint and they run on their own thread. Animating width, height, top, or margin forces a layout pass on every frame, which is where janky animations come from. Move things with translate rather than by changing position values.

### How do I respect prefers-reduced-motion?

Wrap the animation in @media (prefers-reduced-motion: no-preference), so motion is opt-in rather than opt-out. For people who've asked for reduced motion, either drop the animation entirely or replace it with a cross-fade — vestibular triggers are movement and parallax, not opacity changes.

### Why doesn't my animation run when the element appears?

A CSS animation starts when the element is added to the document with the animation applied. If you toggle a class on an element that was already there, it runs immediately; if the element is inserted by a framework, it runs on mount. The usual culprit is a display: none parent — animations don't run on elements that aren't rendered.

## References

- [CSS Animations Level 1](https://www.w3.org/TR/css-animations-1/) — W3C. The specification defining keyframes, timing functions, and animation properties.
- [animation](https://developer.mozilla.org/en-US/docs/Web/CSS/animation) — MDN Web Docs. Shorthand reference for the properties this tool emits.
- [prefers-reduced-motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion) — MDN Web Docs. The media query every generated animation should be wrapped in.
- [Understanding SC 2.3.3: Animation from Interactions](https://www.w3.org/WAI/WCAG22/Understanding/animation-from-interactions.html) — W3C WAI. The accessibility requirement to offer a way to disable non-essential motion.

## Related tools

- [CSS Box Shadow Generator](https://generate.now/box-shadow): Build CSS shadows with sliders for offset, blur, spread, color, and opacity. Live preview, multi-shadow stacking, copy as CSS or Tailwind.
- [CSS Gradient Generator](https://generate.now/gradient): Build linear and radial gradients visually. Pick stops, angle, and direction; copy as CSS or Tailwind arbitrary value.
- [Glassmorphism Generator](https://generate.now/glassmorphism): Visual builder for frosted-glass cards. Sliders for blur, opacity, saturation, border — copy CSS or Tailwind.
