Editeur d'animations CSS

Construisez des animations CSS keyframes visuellement avec un editeur de timeline. Export CSS et Tailwind.

CSS
@keyframes custom-anim {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
  }
}

.animated-element {
  animation: custom-anim 500ms ease-out 1;
}
Tailwind CSS
/* Add to your CSS */
@keyframes custom-anim {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
  }
}

/* Use in Tailwind */
<div class="animate-[custom-anim_500ms_ease-out]">
  ...
</div>

This CSS Animation Builder lets you compose keyframe animations on a visual timeline instead of hand-writing @keyframes blocks and counting percentages. You add keyframes at points along the timeline, set the transform, opacity, color, or filter values you want at each one, and the tool assembles the corresponding @keyframes rule plus the animation shorthand. When you're happy, you export ready-to-paste CSS or equivalent Tailwind utility classes.

Under the hood every animation you build is two things: a @keyframes rule that describes the property values at each percentage (0% through 100%), and an animation property on the element that references it — name, duration, timing-function, delay, iteration-count, direction, and fill-mode. The builder edits both sides at once, so dragging a keyframe or tweaking an easing curve rewrites the generated code live.

Because the output is plain CSS, the animation runs on the compositor when you stick to transform and opacity, which keeps it off the main thread and smooth at 60fps. That's the real value of a keyframe animation builder: you get the visual, tactile feedback of a timeline editor while still shipping standard, framework-agnostic CSS that works anywhere.

Building an animation step by step

  1. 1

    Add keyframes along the timeline at the points where something should change — typically a start keyframe at 0% and an end keyframe at 100%, then any intermediate stops (e.g. 50%) for multi-stage motion.

  2. 2

    Select a keyframe and set its properties: transform (translate, scale, rotate, skew), opacity, background/color, or filter values. The panel writes these into that keyframe's declaration block.

  3. 3

    Set the animation timing controls — duration, delay, timing-function (ease, linear, cubic-bezier, or steps), iteration-count (a number or infinite), direction (normal, alternate, reverse), and fill-mode.

  4. 4

    Preview the result in the live pane and scrub or replay the timeline to check the motion and easing feel right.

  5. 5

    Copy the generated CSS @keyframes plus animation shorthand, or switch to the Tailwind output to get the equivalent utility classes and arbitrary-value config.

When you'd reach for this

  • Micro-interactions and UI feedback

    Build hover pulses, button press bounces, loading spinners, and toast slide-ins where you need precise easing and timing rather than an off-the-shelf library animation.

  • Attention and onboarding cues

    Create attention-grabbing shakes, glows, or staggered fade-ins for empty states and first-run tooltips, then tune iteration-count and delay so they draw the eye without being annoying.

  • Prototyping motion before committing to a library

    Sketch the exact feel of a transition visually, then decide whether plain CSS is enough or whether you actually need Framer Motion or GSAP — often the CSS export is all you need.

  • Handing motion specs to a team

    Designers can dial in the timing curve and durations and export standard CSS, giving engineers an unambiguous, copy-paste implementation instead of a vague 'make it bouncy'.

Practical notes and gotchas

  • Animate transform and opacity whenever possible. They're GPU-composited and don't trigger layout or paint; animating width, height, top, or margin forces reflow and will stutter on lower-end devices.
  • Wrap decorative motion in @media (prefers-reduced-motion: reduce) and drop to a simpler or no animation. This isn't optional polish — it's an accessibility requirement for users with vestibular disorders.
  • Use animation-fill-mode: forwards (or both) if you want the element to hold its final keyframe values after the animation ends; without it the element snaps back to its pre-animation state at 100%.
  • Reach for cubic-bezier() over the named keywords for anything that should feel deliberate. Named easings like ease-in-out are fine defaults, but custom curves (e.g. cubic-bezier(.34,1.56,.64,1) for overshoot) are what make motion feel intentional.
  • Prefer will-change: transform sparingly and only on elements about to animate. Leaving it on permanently or applying it to many elements wastes memory and can actually hurt performance.

Questions about CSS keyframe animations

What's the difference between a CSS transition and a keyframe animation?+

A transition interpolates between two states triggered by a change (like :hover), so it only has a start and end. A @keyframes animation can define many intermediate steps, run automatically on load, loop, and reverse — it's the right tool when you need multi-stage or self-running motion.

How do I make a CSS animation loop forever?+

Set animation-iteration-count to infinite. Pair it with animation-direction: alternate if you want it to play forward then backward smoothly instead of jumping back to the start on each cycle.

Why does my element jump back to its original position after the animation?+

By default an element returns to its unanimated styles once the animation completes. Add animation-fill-mode: forwards to retain the values from the last keyframe, or both to also apply the first keyframe's values during any delay.

Which CSS properties are cheap to animate?+

transform and opacity are the cheapest because the browser can composite them on the GPU without recalculating layout or repainting. Avoid animating geometry properties like width, height, top, left, and margin, which trigger reflow every frame.

Can I convert these CSS animations to Tailwind?+

Yes. This tool exports Tailwind output alongside the raw CSS: the @keyframes go into your theme config and the animation is applied via a utility class, with arbitrary values like animate-[spin_2s_linear_infinite] for one-offs.

How do I create stepped or frame-by-frame animation instead of smooth motion?+

Use the steps() timing function, e.g. steps(4, end), which jumps between discrete states rather than interpolating. It's how sprite-sheet animations and typewriter effects are built in pure CSS.