Tutorials

Animate Image exports explained

Animate Image exports HTML, CSS, Web Animations, GSAP, Motion (React) and JSON. What each one is, when to pick it, and what the code looks like.

· 5 min read

Once an image is animated in Animate Image, the Export button offers six formats: HTML, CSS, Web Animations, GSAP, Motion (React) and JSON. Each has a Copy button. They describe the same animation, so the choice is about where it is going, not what it looks like.

This guide explains each format, when to pick it, and what kind of code to expect. If you have not made an animation yet, start with how to animate a static image.

About the snippets: the code below is illustrative. It shows the kind of output each format gives, a fade-up entrance with a staggered delay, not the exact code the export produces. Class names, values and structure in your export will differ.

Quick guide: which one to pick

FormatPick it whenNeeds a library?
HTMLYou want a working page to open, share or start fromNo
CSSYou have the markup and only want the animation rulesNo
Web AnimationsYou want to start, pause or replay it from JavaScriptNo
GSAPYour site already uses GSAPGSAP
Motion (React)You build in React and use MotionMotion for React
JSONYou want the data itself, to store or transformNo

HTML: a working page

The HTML export is a page rather than a fragment, with the parts and the animation together. Save it, open it in a browser, and it plays. It is the best choice for a quick share, a prototype, or a reference a developer can pull apart.

<div class="scene">
  <img class="part part-stage" src="stage.png" alt="">
  <img class="part part-hero" src="hero.png" alt="">
  <img class="part part-accent" src="badge.png" alt="">
</div>
<style>
  .part { animation: fade-up 400ms ease-out both; }
  .part-hero   { animation-delay: 80ms; }
  .part-accent { animation-delay: 160ms; }
</style>

Use it when the animation will live on its own, such as an embedded hero or a demo page. For a page that already exists, the CSS export is usually easier to merge.

CSS: just the rules

The CSS export gives you keyframes and the animation properties for each part. In CSS a stagger is normally carried by animation-delay, so the gap between parts you set in the editor shows up as a series of delays.

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.part-hero    { animation: fade-up 400ms ease-out 80ms both; }
.part-support { animation: fade-up 400ms ease-out 160ms both; }

@media (prefers-reduced-motion: reduce) {
  .part { animation: none; }
}

CSS is the lightest option and needs no JavaScript. The trade-off is control: it plays on load, and replaying it means removing and re-adding a class. If you want to compare the two approaches in depth, see GSAP vs CSS animation. The reduced-motion block above is a habit worth keeping whichever format you choose.

Web Animations: CSS timing, JavaScript control

The Web Animations export uses element.animate(), which is built into every modern browser. You get the same keyframes and timing as CSS, plus an animation object you can play, pause, reverse or wait for.

const parts = document.querySelectorAll('.part');
parts.forEach((el, i) => {
  el.animate(
    [
      { opacity: 0, transform: 'translateY(12px)' },
      { opacity: 1, transform: 'none' }
    ],
    { duration: 400, delay: i * 80, easing: 'ease-out', fill: 'both' }
  );
});

Pick this when the entrance should start on a trigger, such as when the image scrolls into view, without adding a library. Our Web Animations API guide covers the controls in detail.

GSAP: for sites that already use it

The GSAP export writes the animation as GSAP tweens. If your site already loads GSAP, this is the natural fit: it slots into your existing timelines and scroll triggers.

gsap.from('.part', {
  opacity: 0,
  y: 12,
  duration: 0.4,
  ease: 'power2.out',
  stagger: 0.08
});

Note that GSAP uses seconds, not milliseconds, so the 400 ms default duration becomes 0.4 and an 80 ms gap becomes a stagger of 0.08. If your project does not use GSAP yet, adding it only for one entrance is rarely worth it; CSS or Web Animations will do.

Motion (React): for React projects

The Motion (React) export uses the Motion library for React. In Motion, each moving part is typically a motion element with initial and animate states, and a stagger shows up as a delay per part.

import { motion } from 'motion/react';

export function HeroImage() {
  return (
    <div className="scene">
      <motion.img src="/stage.png" alt=""
        initial={{ opacity: 0 }} animate={{ opacity: 1 }}
        transition={{ duration: 0.4 }} />
      <motion.img src="/hero.png" alt=""
        initial={{ opacity: 0, y: 12 }} animate={{ opacity: 1, y: 0 }}
        transition={{ duration: 0.4, delay: 0.08 }} />
    </div>
  );
}

Pick it if your project already uses Motion. It keeps the animation inside the component, where React developers expect to find it. Like GSAP, Motion uses seconds.

JSON: the data

The JSON export is the animation as data rather than code. Use it when you want to keep the animation in a form you can read, store or transform yourself, for example to generate code for a stack not listed here, or to hand to a model with your own instructions.

{
  "parts": [
    { "name": "hero", "role": "Hero", "entrance": "Fade up", "delay": 80 },
    { "name": "badge", "role": "Accent", "entrance": "Pop", "delay": 160 }
  ],
  "duration": 400
}

That shape is only a sketch to show the idea. Open your own export to see the real structure before you write anything that reads it.

Before you ship any of them

For a full example from screenshot to landing page, read animate a product screenshot for a landing page.

Questions

Which export formats does Animate Image have?

HTML, CSS, Web Animations, GSAP, Motion (React) and JSON. Each one has a Copy button.

Which export should I use for a plain website?

HTML if you want a working page to start from, or CSS if you already have the markup and only need the animation rules. Neither needs a library.

Which export is best for React?

Motion (React), which uses the Motion library for React. If you would rather not add a dependency, the CSS or Web Animations export also works inside React components.

Do I need to save before exporting?

No, but it helps. Save keeps the animation in My Gallery, and saving again updates the same copy, so you can come back later and copy another format.