Skip to content
Framer export

Framer animations after export: what converts to React and what does not

What happens to Framer animations when a site becomes React code: hover states, variants, appear and scroll effects, menus, and how to check each one.

  • Framer animations
  • Motion
  • React
  • Interactions

Short answer

When FrameToNext converts a Framer site, hover and press states, variant transitions, appear effects, supported scroll effects and menu or overlay transitions are rebuilt in React, using the open-source Motion library where an animation needs it. An effect that cannot be reproduced is left out and listed in the report, never approximated silently.

Animation is usually the reason a site was built in Framer, and the first thing people worry about when they move it to code. This article explains what a FrameToNext conversion does with each kind of animation, and how to check the result yourself.

Where a Framer animation actually lives

A published Framer site is a React application. An animation is not in the HTML you see with View Source: it is in the JavaScript modules the site loads, as variant names, transition settings and event handlers such as a tap or a hover. That is why saving the page's HTML does not give you an editable animation.

FrameToNext reads those published modules as data, without running them, and finds each component's variants, the events that switch between them, and the transition each switch uses. It then writes React code that does the same thing.

What converts

In FramerIn the converted project
Hover and press statesRebuilt from the component's own variants and handlers
Variants and their transitionsKept, with readable variant names such as Default and Default-hover
Appear effectsRebuilt where supported, with Motion
Scroll effectsSupported ones are rebuilt; the rest are reported
Menus and overlaysOpen and close with their transitions; a menu tap stays a menu toggle
BreakpointsKept, so the layout changes at the same widths

What the code looks like

Animations that need a library use Motion, the open-source project that Framer Motion became. It is installed as the motion package and imported from motion/react. The sample below shows the kind of code Motion uses; the code in your project follows your own components and is named after them.

A Motion component (illustration)
"use client";
import { motion } from "motion/react";

export function Card({ children }: { children: React.ReactNode }) {
  return (
    <motion.div
      initial={{ opacity: 0, y: 16 }}
      whileInView={{ opacity: 1, y: 0 }}
      whileHover={{ scale: 1.02 }}
      transition={{ duration: 0.4 }}
    >
      {children}
    </motion.div>
  );
}

Because this is source code, you can change a duration, remove an effect or add a new one in the file, which you cannot do in a saved copy of the published site. For how the two names relate, see Framer vs Framer Motion.

What does not convert

Some effects depend on parts of Framer that FrameToNext does not support yet, or on a third-party script. These are not guessed. The part becomes a visible, labelled placeholder or the effect is left out, and either way it is listed in the conversion report with the reason, so you know what to finish by hand.

How to check your animations

  1. Convert the site. Converting is free.
  2. Open Compare. Your live site and the converted project are side by side, with synced scrolling, at desktop, tablet and phone widths.
  3. Try each hover, tap, menu and scroll effect on both sides.
  4. Read the report for placeholders and effects left out.
  5. Unlock the code when you are happy, and adjust timings in the component files if you want to.

Static HTML export or React conversion?

A static HTML export usually keeps Framer's compiled scripts, so animations keep running exactly as published, but on code nobody can maintain. A conversion gives you animation code you can read and change, with an honest list of what did not come across. The trade-offs are in Framer to HTML: static export or React source code?. To see what else converts, read what converts from Framer to React.

Frequently asked questions

Do Framer animations work after exporting to React?

Supported ones do: hover and press states, variant transitions, appear effects, scroll effects and menu or overlay transitions are rebuilt in React. Anything that could not be reproduced is listed in the conversion report.

Does the exported project use Framer Motion?

It uses Motion, the open-source library that Framer Motion became, imported from motion/react. It is an ordinary npm dependency, pinned to an exact version, with no Framer runtime.

Why do animations work in a static HTML export of a Framer site?

Usually because the exporter keeps Framer's compiled JavaScript in the files. The animation still runs on that compiled code, not on source you can read and edit.

How can I check that an animation converted correctly?

Open Compare, which shows your live site and the converted project side by side with synced scrolling, and try the hover, tap and scroll effects on both. Then read the report for anything left out.

Do it with FrameToNext

Keep reading

Step-by-step guides

Your Framer site, as code you own.

Converting is free. See the pages and every file before you pay anything.