framer-motion-variants
Boost your React animations with a collection of pre-built variants for Framer Motion.
Boost your React animations with a collection of pre-built variants for Framer Motion. This package empowers you to create stunning animations effortlessly, saving you development time and ensuring visual consistency across your project.
- Ready-to-use Variants
- Built for Reusability
npm install framer-motion framer-motion-variants
- Import
motion
andfadeIn
variant from their packages.
import { motion } from "framer-motion";
import { fadeIn } from "framer-motion-variants";
- Wrap your component with a
motion.div
element and assign thefadeIn
variant to the variants prop.
const MyComponent = () => {
return (
<motion.div
variants={fadeIn}
initial="initial"
animate="animate"
>
{/* Your component content */}
</motion.div>
);
};