@tank/framer-motion
Installation
SKILL.md
Motion for React
Core Philosophy
- Springs over tweens — Spring physics feel natural because they incorporate velocity. Default to springs for movement (x, y, scale), tweens for visual properties (opacity, color).
- Motion values over React state — Motion values update the DOM directly without re-renders. Use them for anything that changes rapidly (scroll, mouse, continuous animation).
- Declarative first, imperative when needed — Use
animate,whileHover,variantsfor 90% of work. Reach foruseAnimateonly for sequences, timeline scrubbing, or event-driven triggers. - Layout animations are magic — The
layoutprop andlayoutIdhandle FLIP animations with scale-distortion correction. Use them for any position/size change. - Respect the user — Always check
useReducedMotion(). Replace movement with opacity-only transitions when reduced motion is preferred.