Framer Motion Generator
Build production-ready Framer Motion (motion/react) animations visually: enter, gesture, and scroll motion with tween or spring transitions, variants, staggered lists, and AnimatePresence exits. Live preview plays the motion; export JSX, a typed TSX component, or variants only.
About this ToolHow it works, benefits & use casesTap to collapse
Framer Motion is the most popular animation library for React, but its API surface is wide enough that most people copy snippets and tweak them by hand. This generator turns that guesswork into a visual workflow: choose an element and an animation kind (enter, gesture, scroll, or keyframes), pick an enter preset such as slide up, scale, rotate, blur, or flip, and dial in the transition. You can drive motion with a precise tween (duration plus easing) or a physical spring (stiffness, damping, and mass), add a delay or a repeat, and layer on gestures like whileHover, whileTap, whileFocus, and whileInView. A sticky preview plays a CSS approximation of the exact motion so you can feel the timing before you ship, and a Replay button re-triggers it on demand. When you are happy, export real motion/react code: a ready-to-paste JSX component, a typed TSX component, or just the variants object. The tool also handles the harder pieces - named variants versus inline props, staggered lists with staggerChildren and delayChildren, and exit animations wrapped in AnimatePresence.
How to Use
- 1Start from a preset (Fade up on scroll, Hover lift button, Staggered list, Spring modal, Tap shrink) or build from scratch.
- 2Pick the motion element and animation kind, then choose an enter preset and, for slides, a distance.
- 3Choose a tween (duration + easing) or a spring (stiffness, damping, mass), and set any delay or repeat.
- 4Toggle gestures (whileHover, whileTap, whileFocus, whileInView) and watch the preview react to hover and press.
- 5Enable named variants, a staggered list, or an AnimatePresence exit if your component needs them.
- 6Switch the output format between JSX, typed TSX, or variants only, then copy, download, or share the code.
Key Benefits
- Generates real motion/react code, identical to the Framer Motion API you already use
- Live preview plays a CSS approximation of the motion with a Replay button - no heavy runtime
- Full transition control: tween with easing keywords or a spring with stiffness, damping, and mass
- Built-in gestures: whileHover, whileTap, whileFocus, and whileInView with viewport once
- Handles the tricky parts - named variants, staggered lists, and AnimatePresence exits
- Three export shapes: a JSX component, a typed TSX component, or just the variants object
- Shareable URL state so a configured animation can be sent to a teammate
Common Use Cases
- Adding a scroll-triggered fade-up reveal to sections on a marketing page
- Creating a springy hover-and-tap effect for buttons and cards
- Animating a list so its items cascade in with a stagger
- Building a modal that pops in with a spring and animates out via AnimatePresence
- Learning the Framer Motion API by reading the code each control produces
CSS approximation of the exported Framer Motion code.
Copy, download, share, or pipe to another tool
import { motion } from 'motion/react';
export default function AnimatedComponent() {
return (
<motion.div
initial={{ opacity: 0, y: 24 }}
animate={{ opacity: 1, y: 0 }}
transition={{
type: 'spring',
stiffness: 260,
damping: 24,
mass: 1
}}
>
Your content
</motion.div>
);
}- •Prefer spring for natural, physical motion; lower damping for more bounce.
- •Import from motion/react (the current package); the legacy framer-motion path still re-exports it.
Real Framer Motion, generated for you
Output is genuine motion/react code — the same API as framer-motion. Toggle between inline initial/animate props and reusable named variants, drive scroll reveals with whileInView, build cascading lists with staggerChildren, and wrap exits in AnimatePresence. The live preview is a pure-CSS approximation so nothing heavy loads while you tune.
Was this tool helpful?
Share Your Experience
Help others discover this tool!
Related tools
- TypeScript FormatterFormat and beautify TypeScript code
- CSS Easing GeneratorShape cubic-bezier & steps() timing functions on a draggable curve with a live motion preview — 26 presets, overshoot support. Export value, CSS, SCSS, Tailwind, or JS
- Component Name GeneratorTurn a description into ranked, kind-aware component names with a file scaffold and a name validator (casing, collisions, clarity)
- SVG to React ComponentConvert SVG to a clean TSX/JSX/React Native component — currentColor, prop spread, forwardRef, memo, live preview
- View Transitions CSS GeneratorGenerate cross-document @view-transition CSS and the startViewTransition() JS path — with a live preview
- HTML to JSXConvert HTML to React JSX
It imports from motion/react, which is the current package name for the library formerly published as framer-motion. The API is the same; if your project still imports from framer-motion, that path re-exports the identical components, so the generated code works either way.
The exported code is real Framer Motion, but the live preview is driven by a pure CSS-keyframes approximation of the same motion. That keeps the page lightweight and avoids any server-side rendering risk, while still letting you feel the timing, easing, and gestures. The Replay button re-mounts the element to re-trigger it.

