From xonovex-skill-motion-react
Use when adding or editing UI animations in React with the Motion library (formerly Framer Motion). Triggers on `motion/react` imports, `motion.*` components (motion.div, etc.), `whileHover`, `whileTap`, `whileInView`, `useScroll`, `useSpring`, `layoutId`, `AnimatePresence`, and on prompts about entrance animations, hover effects, scroll reveals, layout transitions, or drag interactions, even when the user doesn't say 'Motion'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/xonovex-skill-motion-react:motion-guideThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Install: `npm install motion`
npm install motionimport { motion } from "motion/react"initial/animate with opacity+transform; 0.6-0.8s duration, ease [0.22, 1, 0.36, 1], see references/entrance.mdwhileHover/whileTap with spring physics (stiffness: 300, damping: 20), see references/gestures.mdwhileInView with viewport={{once: true, amount: 0.3}}; use useScroll/useTransform for parallax, see references/scroll.mdlayout prop for automatic FLIP; use layoutId for shared element morphing, see references/layout.mdstaggerChildren: 0.1 and delayChildren, see references/stagger.md<AnimatePresence> with exit prop, see references/exit.mduseReducedMotion() for accessibility, see references/performance.mdimport {motion} from "motion/react";
export function FadeUp({children}: {children: React.ReactNode}) {
return (
<motion.div
initial={{opacity: 0, y: 20}}
animate={{opacity: 1, y: 0}}
transition={{duration: 0.6, ease: [0.22, 1, 0.36, 1]}}>
{children}
</motion.div>
);
}
export function HoverCard({children}: {children: React.ReactNode}) {
return (
<motion.div
whileHover={{y: -8, boxShadow: "0 20px 40px rgba(0,0,0,0.12)"}}
transition={{type: "spring", stiffness: 300, damping: 20}}>
{children}
</motion.div>
);
}
AnimatePresence requires stable, unique key props on direct children — generated keys (Math.random()) recreate every render and break exit animationsinitial={false} on a first-render mounted component skips the initial animation — needed when restoring state from SSR or cachelayout prop) trigger on every reflow — expensive components should also set layoutDependency to scope updatesuseAnimate and useMotionValue aren't React state — changing them doesn't re-render; reading them in JSX without a MotionValue consumer shows stale valuesGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.
npx claudepluginhub xonovex/platform --plugin xonovex-skill-motion-react