视频与音频
react-motion-engineering
Implement and review animation in React/Next.js with a CSS-first approach and GSAP for complex timelines, scroll-driven animation, SVG, drag, or high-frequency motion. Use when animation, motion, GSAP, ScrollTrigger, timelines, or reduced-motion behavior is part of the task.
Taimoor Khan · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add Taimoorkhan1122/boring-react --skill react-motion-engineering技能说明
name: react-motion-engineering description: Implement and review animation in React/Next.js with a CSS-first approach and GSAP for complex timelines, scroll-driven animation, SVG, drag, or high-frequency motion. Use when animation, motion, GSAP, ScrollTrigger, timelines, or reduced-motion behavior is part of the task. license: MIT compatibility: React projects; GSAP guidance applies only when GSAP is installed or explicitly selected. metadata: author: Taimoor Khan version: "1.0.0"
React Motion Engineering
Motion is a usability tool. It must not compromise accessibility, lifecycle correctness, responsiveness, or frame performance.
Apply react-production-engineering and react-component-engineering alongside this skill.
Tool hierarchy
Choose the simplest tool that communicates the state change:
- no animation when it adds no meaning;
- CSS transitions/keyframes for simple transitions;
- Web Animations API when appropriate to the existing stack;
- GSAP for complex sequencing, scroll linkage, SVG, drag, or high-frequency interactive animation.
Do not add GSAP for a basic hover/fade.
Workflow
- Define the purpose of the motion and the no-animation fallback.
- Determine reduced-motion behavior before implementation.
- Choose CSS/platform/GSAP based on complexity.
- Keep animation ownership aligned with component ownership and cleanup lifecycle.
- Prefer transform/opacity for continuous animation and measure expensive effects.
- Verify keyboard/touch behavior and multiple responsive layouts.
- Test on realistic lower-powered/mobile hardware for important motion.
Non-negotiable rules
- Respect
prefers-reduced-motionfor non-essential motion. - Content and controls must remain usable when animation is disabled or fails.
- Do not use scroll-jacking for ordinary content navigation.
- Do not create a new tween on every pointer event in a high-frequency path.
- Clean up timelines, observers, listeners, and ScrollTrigger instances when their owner unmounts.
- Do not make animation callbacks the only mechanism that completes business-critical state.
- Hover animation must not be the only interaction feedback; preserve focus/touch/selected states.
When to load references
- GSAP + React lifecycle: references/gsap-react.md
- Reduced motion: references/reduced-motion.md
- Scroll motion: references/scroll-animation.md
- Animation performance: references/performance.md