How to use the CSS Animation Generator
- Pick a preset — hover the tiles to preview them — or start from a blank keyframe.
- Set duration, delay, iterations, easing and the trigger (load, hover, click, scroll).
- Edit keyframes on the timeline: click to add one, drag to move it, then adjust its properties with the sliders.
- Scrub, slow down or turn on onion skin to fine-tune, then copy the CSS, Tailwind or HTML.
What you can build
- Keyframe timeline — add as many keyframes as you like, drag them to new percentages, and give each its own easing.
- Properties — translate X/Y, rotate, 3D rotate X/Y, scale, skew, opacity, blur, glow (box-shadow), background colour and border radius. Missing values are interpolated, so transforms never jump.
- Triggers — on load, hover, click, when scrolled into view, or a CSS-only scroll-driven animation.
- Stagger — animate a list one item after another with a single CSS custom property.
- Inspect — pause, scrub frame by frame, slow down to ¼ speed and switch on onion skin to see every keyframe at once.
- Export — CSS shorthand or longhand, HTML, JavaScript, Tailwind v3 and v4, a SCSS mixin, a standalone demo file or a share link.
The animation shorthand
| Part | Example | Meaning |
|---|---|---|
| name | fade-in-up | The @keyframes rule to run |
| duration | 0.6s | Length of one cycle |
| timing function | cubic-bezier(.33,1,.68,1) | Speed curve between keyframes |
| delay | 0.2s | Wait before starting; negative values start part-way through |
| iteration count | infinite | How many cycles |
| direction | alternate | Play backwards on every other cycle |
| fill mode | both | Keep the first frame before and the last frame after playing |
Accessibility
Some people get dizzy or nauseous from motion. With Respect prefers-reduced-motion on, the CSS switches the animation off for visitors who have enabled “reduce motion” in their operating system. Avoid flashing more than three times a second, and keep looping animations subtle or give users a way to pause them.
Performance tips
Animate transform and opacity instead of top, left, width or margin, which force layout on every frame. Add will-change only to elements that are about to animate. Shape your easing with the cubic-bezier generator, add a spinner from the CSS loader generator, and pair animations with box shadows or gradients.
Tools that pair well with the CSS Animation Generator
- CSS Hover Animation Generator — Design hover animations for buttons, cards, links and icons.
- Clamp Calculator — Enter a minimum and maximum size and the viewport range — get a zoom-friendly clamp() value with the maths explained, a live preview and a complete fluid type or space scale.
- PX to REM Converter — Convert between pixels, rem and em with your own root font size — or paste a whole stylesheet and convert every px value in one go.
- SVG to JSX Converter — Paste an SVG from Figma, Illustrator or an icon set and get a ready-to-use React (JSX or TSX) component — with a safe preview of the icon.
Frequently asked questions
Is the generated CSS free to use?
Can I edit an animation I already have?
How do I start the animation when the element scrolls into view?
animation-timeline: view() with no JavaScript in browsers that support it.Does it work with Tailwind CSS?
tailwind.config.js block for v3 and an @theme block for v4, so you can use the animation as an animate-* class.Which properties are best for smooth animation?
transform and opacity run on the GPU compositor and stay smooth even on slow phones. Blur, shadows, colours and border radius cost more, so use them sparingly on large elements.