---
name: "framer-motion-micro-interactions"
description: "Build natural, responsive UI micro-interactions and gestures with Framer Motion."
metadata:
  author: "Framer"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "create framer motion button"
  - "use animatepresence exit animation"
  - "configure spring physics framer"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Framer Motion Spring Physics & Micro-Interactions

Implements declarative React motion components: whileHover, whileTap, drag constraints, spring physics (damping, stiffness, mass), and AnimatePresence exit animations.

## When to Invoke
Invoke this skill whenever you need to:
- create framer motion button
- use animatepresence exit animation
- configure spring physics framer

## Execution SOP & Rules
1. Use motion.div rather than standard div elements for animated interactive wrappers.
2. Configure spring transitions: transition={{ type: 'spring', stiffness: 400, damping: 25 }}.
3. Always supply unique, stable key props to elements wrapped in <AnimatePresence>.
4. Animate only GPU-accelerated CSS properties: transform (x, y, scale, rotate) and opacity.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
