---
name: "framer-motion-layout-animations"
description: "Create fluid 60 FPS declarative animations, spring physics, and shared element layout morphs."
metadata:
  author: "Framer"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "animatepresence exit animation"
  - "shared element transition layoutid framer"
  - "spring physics motion"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Framer Motion Layout Animations & Shared Element Transitions

Builds UI animations with Framer Motion: layout animations (layoutId for shared morphs), AnimatePresence for exit animations, drag gestures with constraints, and custom spring physics curves.

## When to Invoke
Invoke this skill whenever you need to:
- animatepresence exit animation
- shared element transition layoutid framer
- spring physics motion

## Execution SOP & Rules
1. Import { motion, AnimatePresence } from 'framer-motion'.
2. Use layoutId='active-indicator' on elements across siblings to trigger automatic layout morphing.
3. Wrap conditional elements in <AnimatePresence mode='wait'> and define initial, animate, and exit props.
4. Tune spring physics: transition={{ type: 'spring', stiffness: 350, damping: 25 }} for natural motion.

## 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.
