Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.
.claude/skills/aiskillstore-framer-motion/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-11 | ✗→✓ | ▲ Improved | 57% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 93% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 84% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 116% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 35% | 0% |
Production-ready animations for React applications.
bashnpm install framer-motion # or pnpm add framer-motion
tsximport { motion } from "framer-motion"; // Simple animation <motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} transition={{ duration: 0.5 }} > Content </motion.div>
| Concept | Guide | |---------|-------| | Motion Component | reference/motion-component.md | | Variants | reference/variants.md | | Gestures | reference/gestures.md | | Hooks | reference/hooks.md |
| Pattern | Guide | |---------|-------| | Page Transitions | examples/page-transitions.md | | List Animations | examples/list-animations.md | | Scroll Animations | examples/scroll-animations.md | | Micro-interactions | examples/micro-interactions.md |
| Template | Purpose | |----------|---------| | templates/page-transition.tsx | Page transition wrapper | | templates/animated-list.tsx | Animated list component |
tsx<motion.div initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: -20 }} transition={{ duration: 0.3 }} > Content </motion.div>
tsx<motion.button whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }} transition={{ type: "spring", stiffness: 400, damping: 17 }} > Click me </motion.button>
tsxconst container = { hidden: { opacity: 0 }, show: { opacity: 1, transition: { staggerChildren: 0.1 } } }; const item = { hidden: { opacity: 0, y: 20 }, show: { opacity: 1, y: 0 } }; <motion.ul variants={container} initial="hidden" animate="show"> {items.map(i => ( <motion.li key={i} variants={item}>{i}</motion.li> ))} </motion.ul>
tsximport { AnimatePresence, motion } from "framer-motion"; <AnimatePresence mode="wait"> {isVisible && ( <motion.div key="modal" initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} > Modal content </motion.div> )} </AnimatePresence>
tsx<motion.div initial={{ opacity: 0, y: 50 }} whileInView={{ opacity: 1, y: 0 }} viewport={{ once: true, margin: "-100px" }} transition={{ duration: 0.5 }} > Animates when scrolled into view </motion.div>
tsx<motion.div drag dragConstraints={{ left: -100, right: 100, top: -100, bottom: 100 }} dragElastic={0.1} > Drag me </motion.div>
tsx<motion.div layout layoutId="shared-element"> Content that animates when layout changes </motion.div>
tsx// Tween (default) transition={{ duration: 0.3, ease: "easeOut" }} // Spring transition={{ type: "spring", stiffness: 300, damping: 20 }} // Spring presets transition={{ type: "spring", bounce: 0.25 }} // Inertia (for drag) transition={{ type: "inertia", velocity: 50 }}
tsx// Built-in easings ease: "linear" ease: "easeIn" ease: "easeOut" ease: "easeInOut" ease: "circIn" ease: "circOut" ease: "circInOut" ease: "backIn" ease: "backOut" ease: "backInOut" // Custom cubic-bezier ease: [0.17, 0.67, 0.83, 0.67]
Always respect user preferences:
tsximport { motion, useReducedMotion } from "framer-motion"; function Component() { const prefersReducedMotion = useReducedMotion(); return ( <motion.div initial={{ opacity: 0, y: prefersReducedMotion ? 0 : 20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: prefersReducedMotion ? 0 : 0.3 }} > Respects motion preferences </motion.div> ); } // Or use media query const variants = { initial: { opacity: 0 }, animate: { opacity: 1 }, }; <motion.div variants={variants} initial="initial" animate="animate" className="motion-reduce:transition-none" >
tsxconst fadeInUp = { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.4 } }; <motion.div {...fadeInUp}>Content</motion.div>
tsxconst container = { hidden: { opacity: 0 }, show: { opacity: 1, transition: { staggerChildren: 0.1, delayChildren: 0.2 } } }; const item = { hidden: { opacity: 0, x: -20 }, show: { opacity: 1, x: 0 } };
tsx<AnimatePresence> {isOpen && ( <> {/* Backdrop */} <motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} className="fixed inset-0 bg-black/50" onClick={onClose} /> {/* Modal */} <motion.div initial={{ opacity: 0, scale: 0.95 }} animate={{ opacity: 1, scale: 1 }} exit={{ opacity: 0, scale: 0.95 }} className="fixed inset-x-4 top-1/2 -translate-y-1/2 ..." > Modal content </motion.div> </> )} </AnimatePresence>
tsx<motion.div initial={false} animate={{ height: isOpen ? "auto" : 0 }} transition={{ duration: 0.3, ease: "easeInOut" }} className="overflow-hidden" > <div className="p-4">Accordion content</div> </motion.div>
useReducedMotionlayout sparingly: Can be expensive, use only when neededAnimatePresenceopacity, scale, x, y over width, height| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-11 | fail→pass | 14,778 | 15,481 | +5% | 1 | 1 | 0% | 1,890 | 2,968 | +57% | 0 | 0 | — |
case-06 | fail→pass | 58,896 | 29,216 | -50% | 1 | 1 | 0% | 1,984 | 3,827 | +93% | 0 | 0 | — |
case-07 | fail→pass | 17,412 | 22,262 | +28% | 1 | 1 | 0% | 2,306 | 4,237 | +84% | 0 | 0 | — |
case-08 | pass→pass | 38,237 | 16,732 | -56% | 1 | 1 | 0% | 2,232 | 4,049 | +81% | 0 | 0 | — |
case-09 | pass→pass | 21,078 | 19,298 | -8% | 1 | 1 | 0% | 3,018 | 4,344 | +44% | 0 | 0 | — |
case-10 | pass→pass | 33,096 | 7,643 | -77% | 1 | 1 | 0% | 2,244 | 3,197 | +42% | 0 | 0 | — |
case-01 | fail→pass | 132,794 | 80,322 | -40% | 1 | 1 | 0% | 2,738 | 5,904 | +116% | 0 | 0 | — |
case-02 | pass→pass | 15,605 | 17,196 | +10% | 1 | 1 | 0% | 1,711 | 3,240 | +89% | 0 | 0 | — |
case-03 | pass→pass | 36,196 | 69,222 | +91% | 1 | 1 | 0% | 2,466 | 3,831 | +55% | 0 | 0 | — |
case-04 | pass→pass | 40,076 | 40,062 | -0% | 1 | 1 | 0% | 3,138 | 4,097 | +31% | 0 | 0 | — |
case-05 | pass→pass | 27,726 | 29,835 | +8% | 1 | 1 | 0% | 2,923 | 4,657 | +59% | 0 | 0 | — |
case-12 | pass→pass | 17,596 | 12,072 | -31% | 1 | 1 | 0% | 2,976 | 3,303 | +11% | 0 | 0 | — |
case-13 | fail→fail | 31,346 | 12,545 | -60% | 1 | 1 | 0% | 3,049 | 4,220 | +38% | 0 | 0 | — |
case-14 | pass→pass | 14,515 | 21,590 | +49% | 1 | 1 | 0% | 2,897 | 4,684 | +62% | 0 | 0 | — |
case-15 | pass→pass | 17,781 | 9,998 | -44% | 1 | 1 | 0% | 2,445 | 3,480 | +42% | 0 | 0 | — |
case-16 | pass→pass | 20,147 | 14,628 | -27% | 1 | 1 | 0% | 2,883 | 4,902 | +70% | 0 | 0 | — |
case-17 | fail→pass | 22,796 | 20,149 | -12% | 1 | 1 | 0% | 3,561 | 4,792 | +35% | 0 | 0 | — |
case-18 | pass→fail | 17,643 | 11,179 | -37% | 1 | 1 | 0% | 2,381 | 2,908 | +22% | 0 | 0 | — |
case-19 | fail→pass | 13,726 | 13,823 | +1% | 1 | 1 | 0% | 2,308 | 3,676 | +59% | 0 | 0 | — |
case-20 | pass→pass | 13,456 | 10,944 | -19% | 1 | 1 | 0% | 2,631 | 3,808 | +45% | 0 | 0 | — |
case-21 | pass→pass | 15,368 | 11,315 | -26% | 1 | 1 | 0% | 3,011 | 4,135 | +37% | 0 | 0 | — |
case-22 | pass→fail | 18,641 | 16,035 | -14% | 1 | 1 | 0% | 3,328 | 4,303 | +29% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +18 percentage points is the difference between those two pass rates over the 22 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.