mcpField
F
framer-motion-best-practices

framer-motion-best-practices

github.com/pproencaDesign & UI218187 installsUpdated 11w ago
Repository

About framer-motion-best-practices

A performance-focused guidance skill for Framer Motion animations in React applications. It is intended for developers implementing or refactoring animations, with prioritized rules spanning bundle size, rendering, layout, scrolling, gestures, and exits.

Key features

  1. 0142 rules across 9 categories
  2. 02Prioritized animation guidance
  3. 03Bundle-size optimization
  4. 04Re-render prevention
  5. 05Layout and scroll animation patterns
  6. 06Gesture, spring, SVG, and exit guidance

Use cases

  1. 01Optimize an animation-heavy React bundle
  2. 02Reduce re-renders during animation
  3. 03Implement layout or shared-element transitions
  4. 04Build scroll-linked or gesture-based interactions

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pproenca/dot-skills --skill framer-motion-best-practices

After installing, type/framer-motion-best-practicesin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

metadata.json
assets/templates/
_template.md
references/
_sections.md
anim-hardware-acceleration.md
anim-independent-transforms.md
anim-keyframes-array.md
anim-opacity-filter.md
anim-transform-properties.md
anim-will-change.md
bundle-dom-animation.md
bundle-dynamic-features.md
bundle-lazy-motion.md
bundle-strict-mode.md
bundle-use-animate-mini.md
exit-animate-presence.md
exit-mode-wait.md
exit-unique-keys.md
gesture-drag-constraints.md
gesture-drag-elastic.md
gesture-tap-cancel.md
gesture-variants-flow.md
gesture-while-props.md
layout-dependency.md
layout-group.md
layout-id-shared.md
layout-position-size.md
layout-scroll.md
rerender-animate-prop.md
rerender-motion-value-event.md
rerender-motion-value.md

Details

From the project README

Community Framer Motion Best Practices

Comprehensive performance optimization guide for Framer Motion animations in React applications. Contains 42 rules across 9 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Adding animations to React components with Framer Motion
  • Optimizing bundle size for animation-heavy applications
  • Preventing unnecessary re-renders during animations
  • Implementing layout transitions or shared element animations
  • Building scroll-linked or gesture-based interactions

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Bundle OptimizationCRITICALbundle-
2Re-render PreventionCRITICALrerender-
3Animation PropertiesHIGHanim-
4Layout AnimationsHIGHlayout-
5Scroll AnimationsMEDIUM-HIGHscroll-
6Gesture OptimizationMEDIUMgesture-
7Spring & PhysicsMEDIUMspring-
8SVG & Path AnimationsLOW-MEDIUMsvg-
9Exit AnimationsLOWexit-

Quick Reference

1. Bundle Optimization (CRITICAL)
2. Re-render Prevention (CRITICAL)
3. Animation Properties (HIGH)
4. Layout Animations (HIGH)
5. Scroll Animations (MEDIUM-HIGH)
6. Gesture Optimization (MEDIUM)
7. Spring & Physics (MEDIUM)
8. SVG & Path Animations (LOW-MEDIUM)
9. Exit Animations (LOW)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

Comments

Markdown supported