How to use the CSS animation generator
- Pick a starting point from the preset gallery. Filter by entrances, exits, attention seekers, loops, text, loaders, hover or scroll-driven, then select Customize.
- Choose a preview subject (box, text, button, icon, card or image placeholder) and a trigger: on load, on hover, or on scroll.
- Edit the keyframes. Select a marker on the timeline to edit that moment. Drag markers to retime them, or focus one and use the arrow keys (Shift moves 10%). Add up to 12 keyframes.
- Set the timing: duration, delay, repeat count or loop forever, direction, fill mode and easing. Choose Custom curve to shape a cubic-bezier, Steps for frame-by-frame motion, or a spring.
- Use the playback bar to pause, restart, scrub to any point or watch at 0.25× to fine-tune details.
- Review the checks, then copy or download CSS, CSS variables, SCSS, a Tailwind config, React or HTML.
How it works: anatomy of a CSS animation
An animation has two parts. The @keyframes rule describes what changes at each point of the timeline, from 0% to 100%. The animation property attaches it to an element and says how long it lasts and how it moves:
animation: name duration timing-function delay iteration-count direction fill-mode;
- Duration and delay are in milliseconds. 200–500 ms suits interface feedback; 600–1,000 ms suits entrances.
- Timing function shapes the speed. Ease-out starts fast and settles gently, which feels natural for things arriving. Back-out overshoots slightly. Springs bounce.
- Iteration count is how many times it plays (
infiniteloops). - Direction can reverse the timeline or alternate it back and forth.
- Fill mode decides whether the first frame applies during the delay (
backwards) and whether the last frame stays afterwards (forwards).bothdoes both, which is what most entrances need.
The studio only writes the properties you actually animate, and writes them in every keyframe so browsers interpolate them correctly. Keyframes with identical styles are merged, for example 0%, 20%, 53%, 80%, 100% in the bounce animation.
Browser support and performance
Keyframe animations work in every current browser. Scroll-driven timelines (animation-timeline: view()) are supported in Chromium-based browsers and newer versions of Safari, and the export keeps them inside @supports, so other browsers show the element without animation. linear() springs fall back to a cubic-bezier curve.
For smooth motion, stick to transform and opacity. Avoid animating width, height, top or margin, which force layout recalculation on every frame.
Worked examples
Example 1: a card that fades in from below
Load fade-in-up-md with the card subject. It moves the card up 24px while fading in over 700ms with an expo-out curve. Add a 100ms delay to the second card and 200ms to the third for a staggered entrance.
Example 2: a typewriter heading
Load typewriter. It reveals the text from the left using clip-path and steps(14, end), so it appears in jumps like a typewriter. Match the step count to the number of characters for the most convincing effect.
Example 3: a reveal on scroll
Load scroll-fade-up. On your page it starts when the element enters the viewport and finishes when it is fully in view. Switch the range to While crossing the viewport for a slower, parallax-like progression.
Tips and common mistakes
- Too much motion. Animate the one thing you want people to notice, not everything on the page.
- Long loops that can’t be paused. Infinite animations next to text are distracting. Keep loops subtle, or provide a pause button for anything longer than five seconds.
- Forgetting the end state. Without
forwardsorboth, an entrance jumps back to its original style when it finishes. - Animating layout properties. Use
transform: translate()instead ofleft/top, andscale()instead ofwidth/height.