consolelog.tools logo

Framer Motion Code Generator

Generate Framer Motion animation code with live preview

Live Preview

Element

Configuration

Generated Code

import { motion } from 'framer-motion';

const variants = {
  hidden: {
  opacity: 0
},
  visible: {
  opacity: 1
}
};

export default function AnimatedComponent() {
  return (
    <motion.div
      initial="hidden"
      animate="visible"
      variants={variants}
      transition={{
  duration: 0.5,
  ease: [
    0,
    0,
    0.2,
    1
  ]
}}
    >
      Your content here
    </motion.div>
  );
}

Animation Presets

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Frequently Asked Questions - Framer Motion Code Generator