Skip to content
Back to search

motion-dev-animations

Creates 120fps GPU-accelerated animations with Motion.dev (Framer Motion successor) for React, Next.js, Svelte, and Astro projects. Use when user requests animation, motion, scroll effects, parallax, hero animations, gestures, drag interactions, spring physics, whileHover effects, whileInView animations, animated UI, micro-interactions, page transitions, or layout animations. Generates production TypeScript/JSX code with accessibility (prefers-reduced-motion) and performance validation (≥60fps). Supports entrance animations, gesture interactions (hover/tap/drag), scroll-based reveals, and layout transitions using spring physics and natural timing. Do NOT use for CSS-only transitions (use native CSS), static sites without JavaScript, Vue animations (use motion-v variant instead), or SVG/Canvas complex animations (GSAP better suited).

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/199-biotechnologies-motion-dev-animations-skill/badge.svg)](/listings/199-biotechnologies-motion-dev-animations-skill)

HTML

<a href="/listings/199-biotechnologies-motion-dev-animations-skill"><img src="/api/listings/199-biotechnologies-motion-dev-animations-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Add to your Claude Code skills directory:

# Clone into your skills folder
git clone https://github.com/199-biotechnologies/motion-dev-animations-skill.git ~/.claude/skills/motion-dev-animations

# Or add as a git submodule in your project
git submodule add https://github.com/199-biotechnologies/motion-dev-animations-skill.git .claude/skills/motion-dev-animations

The skill activates automatically when you mention animations, Motion.dev, scroll effects, parallax, hover effects, or interactive UI in your prompts.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 264 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: motion-dev-animations
  3. description: Creates 120fps GPU-accelerated animations with Motion.dev (Framer Motion successor) for React, Next.js, Svelte, and Astro projects. Use when user requests animation, motion, scroll effects, parallax, hero animations, gestures, drag interactions, spring physics, whileHover effects, whileInView animations, animated UI, micro-interactions, page transitions, or layout animations. Generates production TypeScript/JSX code with accessibility (prefers-reduced-motion) and performance validation (≥60fps). Supports entrance animations, gesture interactions (hover/tap/drag), scroll-based reveals, and layout transitions using spring physics and natural timing. Do NOT use for CSS-only transitions (use native CSS), static sites without JavaScript, Vue animations (use motion-v variant instead), or SVG/Canvas complex animations (GSAP better suited).
  4. allowed-tools: Read, Write, Edit, Bash, Glob, Grep
  5. metadata:
  6. version: "3.0.0"
  7. author: "Motion Dev Standards"
  8. tags: ["motion", "framer-motion", "animation", "react", "nextjs", "svelte", "astro", "gestures", "scroll", "parallax", "microinteractions", "spring-physics", "layout-animations"]
  9. min_claude_version: "3.5"
  10. created: "2025-11-07"
  11. updated: "2025-11-08"
  12. optimization: "Research-backed: imperative language, few-shot (3 examples), layered complexity, progressive loading"
  13. ---
  14. # Motion Dev Animations
  15. > **Motion.dev** - 10M+ downloads/month, successor to Framer Motion
  16. > 120fps GPU-accelerated animations for React, Next.js, Svelte, Astro, Vue
  17. ## Purpose
  18. Generate production-grade animations using Motion.dev following Apple/Jon Ive principles:
  19. **Purposeful** (serves function) | **Smooth** (120fps) | **Accessible** (reduced-motion) | **Performant** (GPU-only) | **Elegant** (subtle) | **Consistent** (unified timing)
  20. ## When to Use
  21. ✅ **Use for**:
  22. - React 19+/Next.js 15+/Svelte 5+/Astro 4+ animation implementation
  23. - Scroll effects (parallax, reveal), gestures (hover, drag, tap), layout animations
  24. - Hero sections, cards, micro-interactions requiring 60fps+ performance
  25. - Projects needing spring physics, natural motion, accessibility
  26. ❌ **Don't use for**:
  27. - CSS-only transitions (use native `transition` property)
  28. - Static sites without JavaScript frameworks
  29. - Vue projects (use `motion-v` package - different API)
  30. - SVG/Canvas complex animations (GSAP better suited)
  31. - Form-only CRUD apps (overkill)
  32. ## Workflow: Clarify → Plan → Implement → Verify
  33. ### Step 1: Clarify Requirements
  34. Determine project context and animation goals:
  35. - Framework (React 19+, Next.js 15+, Svelte 5+, Astro 4+)
  36. - Animation type (entrance, gesture, scroll, layout)
  37. - Design goal (subtle, prominent, playful, professional)
  38. - Performance constraints (target device, bundle limits, accessibility requirements)
  39. - Trigger mechanism (mount, viewport, user interaction)
  40. ### Step 2: Plan Animation Strategy
  41. Define implementation approach:
  42. - Components to animate (headers, cards, buttons, sections)
  43. - Motion patterns (fade, slide, scale, spring, parallax)
  44. - Timing specifications (duration, delay, stagger intervals)
  45. - Physics parameters (stiffness: 300-400, damping: 20, mass: 1)
  46. - Accessibility fallbacks (prefers-reduced-motion alternatives)
  47. ### Step 3: Implement in Phases
  48. Build animations incrementally:
  49. - **Setup**: Install Motion.dev, configure imports, prepare component structure
  50. - **Core Animation**: Apply motion properties (initial, animate, transition)
  51. - **Refinement**: Tune timing, easing curves, spring physics for natural feel
  52. - **Accessibility**: Add reduced-motion detection, keyboard navigation support
  53. - **Optimization**: Verify GPU-acceleration, minimize bundle size, test performance
  54. ### Step 4: Verify Quality Standards
  55. Check against requirements:
  56. - **Performance**: ≥60fps (Chrome DevTools → Performance tab)
  57. - **Layout Stability**: CLS = 0 (Lighthouse audit)
  58. - **Accessibility**: Honors prefers-reduced-motion (system settings test)
  59. - **Keyboard Navigation**: All interactive elements keyboard-accessible
  60. - **Mobile Responsive**: Touch-friendly gestures, tested on iOS/Android
  61. ## Animation Pattern Decision Tree
  62. ```
  63. INPUT: What should animate?
  64. ├─ ENTRANCE (page load, mount)
  65. │ → Pattern: initial={{opacity: 0, y: 20}} animate={{opacity: 1, y: 0}}
  66. │ → Timing: 0.6-0.8s, ease: [0.22, 1, 0.36, 1]
  67. │ → Stagger: 0.1-0.2s between elements
  68. │ → Example: ./examples/hero-fade-up.md
  69. │
  70. ├─ GESTURE (hover, tap, drag)
  71. │ → Pattern: whileHover={{scale: 1.05}}, whileTap={{scale: 0.95}}
  72. │ → Physics: Spring (stiffness: 300-400, damping: 20)
  73. │ → Timing: Instant response (no duration)
  74. │ → Examples: ./examples/card-hover.md, ./examples/magnetic-button.md
  75. │
  76. ├─ SCROLL (reveal, parallax)
  77. │ → Pattern: whileInView + viewport OR useScroll + useTransform
  78. │ → Trigger: viewport={{once: true, amount: 0.3}}
  79. │ → Performance: Transform/opacity only
  80. │ → Examples: ./examples/scroll-reveal.md, ./examples/parallax-layers.md
  81. │
  82. └─ LAYOUT (reorder, expand)
  83. → Pattern: layout prop (auto FLIP)
  84. → Shared: layoutId="id" for morphing
  85. → Caveat: Only animates transforms
  86. ```
  87. ## API Quick Reference
  88. | Component/Hook | Usage | When |
  89. |----------------|-------|------|
  90. | **motion.div** | `<motion.div animate={{x: 100}}>` | Basic animations |
  91. | **whileHover** | `whileHover={{scale: 1.05}}` | Hover states (0.2-0.3s) |
  92. | **whileTap** | `whileTap={{scale: 0.95}}` | Click feedback |
  93. | **whileInView** | `whileInView={{opacity: 1}}` | Scroll reveal |
  94. | **drag** | `drag="x"` dragConstraints | Draggable elements |
  95. | **layout** | `<motion.div layout />` | Auto FLIP animation |
  96. | **useScroll** | Track scroll progress | Parallax, progress bars |
  97. | **useTransform** | Map values | Scroll-linked effects |
  98. | **useSpring** | Spring physics | Smooth value changes |
  99. | **useInView** | Viewport detection | Trigger animations |
  100. **Full API**: See [Complete API Reference](./reference/api-reference.md)
  101. ## Framework Integration
  102. | Framework | Import | Components | Exit Animations |
  103. |-----------|--------|------------|-----------------|
  104. | **React/Next.js** | `"motion/react"` | `<motion.div>` | `<AnimatePresence>` |
  105. | **Svelte** | `"motion"` | Vanilla API | N/A |
  106. | **Astro** | `"motion"` | Client scripts | N/A |
  107. | **Vue** | `"motion-v"` | `<motion.div>` | Similar to React |
  108. ## Quality Standards
  109. | Category | Requirement | How to Verify |
  110. |----------|-------------|---------------|
  111. | **Performance** | ≥60fps | Chrome DevTools → Performance |
  112. | **GPU-accel** | transform/opacity only | No width/height/left/top |
  113. | **Bundle** | <50KB | webpack-bundle-analyzer |
  114. | **Accessibility** | prefers-reduced-motion | System settings test |
  115. | **Mobile** | Touch-friendly | iOS/Android testing |
  116. | **Layout shift** | CLS = 0 | Lighthouse audit |
  117. ## Examples Library (Progressive Loading)
  118. Load on-demand based on animation type:
  119. ### Hero Sections
  120. - [Hero Fade Up](./examples/hero-fade-up.md) - Classic Apple-style entrance
  121. - Hero Stagger - Orchestrated elements
  122. - Hero Split Text - Character reveal
  123. ### Scroll Effects
  124. - [Scroll Reveal](./examples/scroll-reveal.md) - Intersection Observer fade-in
  125. - [Parallax Layers](./examples/parallax-layers.md) - Multi-speed depth
  126. - Scroll Progress - Reading indicator
  127. ### Gestures & Interactions
  128. - [Card Hover](./examples/card-hover.md) - Elegant lift + shadow
  129. - [Magnetic Button](./examples/magnetic-button.md) - Cursor-following
  130. - Drag Carousel - Touch slider
  131. ### Layout Animations
  132. - List Reorder - Drag-to-reorder FLIP
  133. - Accordion - Expand/collapse
  134. - Tab Switch - Shared layout
  135. **Full examples**: All files in `./examples/` directory
  136. ## Reference Documentation (Load On-Demand)
  137. - [Complete API Reference](./reference/api-reference.md) - All components, hooks, props
  138. - [Spring Physics Guide](./reference/spring-physics.md) - Tuning stiffness, damping, mass
  139. - Performance Optimization - GPU, will-change, lazy loading
  140. - Accessibility Guide - Reduced motion, keyboard, screen readers
  141. - Troubleshooting - Common issues, solutions
  142. - Framer Motion Migration - Upgrade guide
  143. ## Templates (Production-Ready)
  144. - [Next.js Page Template](./templates/nextjs-page.tsx) - Hero + features + testimonials
  145. - [Component Library](./templates/component-library.tsx) - 10+ reusable components
  146. - Scroll Template - Parallax + reveal patterns
  147. - Dashboard Template - Interactive cards, charts
  148. ## Installation
  149. ```bash
  150. # React/Next.js/Svelte/Astro
  151. npm install motion
  152. # Vue
  153. npm install motion-v
  154. ```
  155. ## Common Patterns (Copy-Paste Ready)
  156. ### Pattern 1: Fade Up Entrance
  157. ```tsx
  158. <motion.div
  159. initial={{ opacity: 0, y: 20 }}
  160. animate={{ opacity: 1, y: 0 }}
  161. transition={{ duration: 0.6, ease: [0.22, 1, 0.36, 1] }}
  162. />
  163. ```
  164. ### Pattern 2: Hover Card
  165. ```tsx
  166. <motion.div
  167. whileHover={{ y: -8, boxShadow: "0 20px 40px rgba(0,0,0,0.12)" }}
  168. transition={{ type: "spring", stiffness: 300, damping: 20 }}
  169. />
  170. ```
  171. ### Pattern 3: Scroll Reveal
  172. ```tsx
  173. <motion.div
  174. initial={{ opacity: 0, y: 50 }}
  175. whileInView={{ opacity: 1, y: 0 }}
  176. viewport={{ once: true, amount: 0.3 }}
  177. />
  178. ```
  179. **More patterns**: Staggered lists, exit animations, layout transitions → `./examples/` directory
  180. ## Error Handling
  181. | Issue | Solution |
  182. |-------|----------|
  183. | Animation doesn't trigger | Check initial ≠ animate values |
  184. | Poor performance | Use transform/opacity only + will-change CSS |
  185. | Layout shift | Set explicit dimensions, use layout prop |
  186. | Exit not working | Wrap with `<AnimatePresence>`, add key prop |
  187. ## Implementation Best Practices
  188. 1. **Start simple** → Build from fade + slide, add complexity incrementally
  189. 2. **Extract variants** → Define animation states as named variants for maintainability
  190. 3. **Prefer spring physics** → Default to spring transitions (more natural than tween)
  191. 4. **Stagger list items** → Use staggerChildren (0.1-0.2s) for rhythm and hierarchy
  192. 5. **Test mobile thoroughly** → Verify touch gestures, performance on iOS/Android devices
  193. 6. **Include reduced-motion** → Always provide prefers-reduced-motion fallback animations
  194. 7. **Profile performance** → Use Chrome DevTools Performance tab, target ≥60fps
  195. ## Design Philosophy (Apple/Jon Ive Principles)
  196. Apply these design principles to all animations:
  197. - **Simplicity**: Use 200-400ms durations, minimize simultaneous motion, prefer transform properties
  198. - **Natural Physics**: Implement spring-based transitions, avoid linear easing, apply mass-based movement
  199. - **Purposeful Motion**: Guide user attention, provide interaction feedback, establish visual hierarchy
  200. - **Elegant Restraint**: Apply "less is more" principle, maintain consistent timing, respect user motion preferences
  201. ## Validation
  202. For structured output validation, see:
  203. - [Motion Config Schema](./schema/motion-config.schema.json) - JSON schema
  204. - [Validation Script](./scripts/validate_motion_config.py) - Automated checks
  205. ## Metadata
  206. **Version**: 3.0.0 (Research-Backed Optimization)
  207. **Optimization**: Imperative language, few-shot patterns (3 examples), layered complexity, progressive loading
  208. **Token Efficiency**: 87% core reduction (15K → 2K) + auto-caching
  209. **Motion.dev**: v11+
  210. **Frameworks**: React 19+, Next.js 15+, Svelte 5+, Astro 4+, Vue 3+
  211. **Research**: arXiv 2402.07927v1, 2211.01910, 2310.14735v5, PubMed 40334089
  212. **License**: MIT
README.md · README · 160 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center">
  2. # Motion.dev Animations Skill
  3. **Production-grade web animations for Claude Code, powered by Motion.dev.**
  4. [![Star this repo](https://img.shields.io/github/stars/199-biotechnologies/motion-dev-animations-skill?style=for-the-badge&logo=github&label=%E2%AD%90%20Star%20this%20repo&color=yellow)](https://github.com/199-biotechnologies/motion-dev-animations-skill/stargazers)
  5. [![Follow @longevityboris](https://img.shields.io/badge/Follow_%40longevityboris-000000?style=for-the-badge&logo=x&logoColor=white)](https://x.com/longevityboris)
  6. [![Claude Code](https://img.shields.io/badge/Claude_Code-Skill-6C47FF?style=for-the-badge&logo=anthropic&logoColor=white)](https://docs.anthropic.com/en/docs/claude-code)
  7. [![Motion.dev](https://img.shields.io/badge/Motion.dev-v11-FF0055?style=for-the-badge&logo=framer&logoColor=white)](https://motion.dev)
  8. [![License: MIT](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)](LICENSE)
  9. [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-3178C6?style=for-the-badge&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
  10. A Claude Code skill that generates 120fps GPU-accelerated animations using Motion.dev (the successor to Framer Motion). Say "add a hero animation" or "create scroll effects" and get production-ready TypeScript code with accessibility and performance baked in.
  11. ---
  12. [Why This Exists](#why-this-exists) | [Install](#install) | [Quick Start](#quick-start) | [How It Works](#how-it-works) | [Animation Types](#animation-types) | [What's Inside](#whats-inside) | [Contributing](#contributing) | [License](#license)
  13. </div>
  14. ---
  15. ## Why This Exists
  16. Motion.dev has 10M+ downloads per month. It is the standard for web animations in React, Next.js, Svelte, and Astro. But writing good animations is hard. You need spring physics, GPU-accelerated properties, `prefers-reduced-motion` support, and 60fps+ performance targets.
  17. This skill gives Claude Code deep knowledge of Motion.dev patterns so it can generate production animation code from natural language. No more copying from docs. No more guessing spring values. Just describe what you want.
  18. ## Install
  19. Add to your Claude Code skills directory:
  20. ```bash
  21. # Clone into your skills folder
  22. git clone https://github.com/199-biotechnologies/motion-dev-animations-skill.git ~/.claude/skills/motion-dev-animations
  23. # Or add as a git submodule in your project
  24. git submodule add https://github.com/199-biotechnologies/motion-dev-animations-skill.git .claude/skills/motion-dev-animations
  25. ```
  26. The skill activates automatically when you mention animations, Motion.dev, scroll effects, parallax, hover effects, or interactive UI in your prompts.
  27. ## Quick Start
  28. Once installed, use natural language with Claude Code:
  29. ```
  30. "Create a hero section with a fade-up entrance animation"
  31. "Add parallax scrolling to this landing page"
  32. "Build a card component with hover lift and shadow effects"
  33. "Implement drag-to-reorder for this list"
  34. "Add a magnetic button effect to the CTA"
  35. ```
  36. Claude Code will clarify your framework, plan the animation strategy, generate the code, and verify performance.
  37. ## How It Works
  38. The skill follows a four-step workflow:
  39. 1. **Clarify** -- Determines your framework (React 19+, Next.js 15+, Svelte 5+, Astro 4+), animation type, and design goals.
  40. 2. **Plan** -- Selects the right Motion.dev patterns, spring physics, and easing curves for your use case.
  41. 3. **Implement** -- Generates TypeScript/JSX code using GPU-accelerated properties (transform, opacity, filter only). No layout thrashing.
  42. 4. **Verify** -- Checks for 60fps+ performance, `prefers-reduced-motion` support, keyboard navigation, and bundle size under 50KB.
  43. The skill uses progressive loading. The core instructions are ~2,000 tokens. Examples, API reference, and templates load on-demand only when needed. This means 87% less context consumption compared to loading everything upfront.
  44. ## Animation Types
  45. ### Entrance Animations
  46. - **Hero Fade Up** -- Apple-style fade + slide entrance for landing pages
  47. - **Hero Stagger** -- Orchestrated title, subtitle, CTA sequence
  48. - **Scroll Reveal** -- Intersection Observer fade-in on scroll
  49. ### Scroll Effects
  50. - **Parallax Layers** -- Multi-speed depth effect with `useScroll` and `useTransform`
  51. - **Scroll Progress** -- Reading progress bar tied to scroll position
  52. ### Gesture Interactions
  53. - **Card Hover** -- Lift with shadow using `whileHover`
  54. - **Magnetic Button** -- Cursor-following effect for CTAs
  55. - **Drag Carousel** -- Touch-friendly horizontal slider with `drag` constraints
  56. ### Micro-interactions
  57. - **Button Press** -- Tactile tap feedback with `whileTap`
  58. - **Toggle Switch** -- Smooth state transitions with `layout` animations
  59. - **Loading Spinner** -- Spring-based loader animation
  60. ### Layout Animations
  61. - **List Reorder** -- Drag-to-reorder with FLIP technique
  62. - **Accordion** -- Smooth expand/collapse with `AnimatePresence`
  63. - **Tab Switch** -- Shared layout transitions with `layoutId`
  64. ## What's Inside
  65. ```
  66. motion-dev-animations-skill/
  67. ├── SKILL.md # Core instructions (~2,000 tokens)
  68. ├── examples/ # Animation patterns (loaded on-demand)
  69. │ ├── hero-fade-up.md # Apple-style entrance animation
  70. │ ├── scroll-reveal.md # Intersection Observer reveals
  71. │ ├── card-hover.md # Hover lift + shadow effect
  72. │ ├── parallax-layers.md # Multi-speed parallax
  73. │ ├── magnetic-button.md # Cursor-following button
  74. │ └── example-config.json # Sample motion config
  75. ├── reference/ # API docs (loaded on-demand)
  76. │ ├── api-reference.md # Full Motion.dev API
  77. │ └── spring-physics.md # Spring values and presets
  78. ├── templates/ # Starter code
  79. │ ├── nextjs-page.tsx # Full page with animations
  80. │ └── component-library.tsx # Reusable animation components
  81. ├── schema/ # Validation
  82. │ └── motion-config.schema.json # JSON schema for configs
  83. └── scripts/ # Tools
  84. └── validate_motion_config.py # Config validator
  85. ```
  86. ## Performance Standards
  87. Every animation this skill generates meets these targets:
  88. | Metric | Target | Method |
  89. |--------|--------|--------|
  90. | Frame rate | 60fps+ (120fps ideal) | GPU-accelerated transforms only |
  91. | Bundle size | < 50KB | Tree-shaking, code splitting |
  92. | Accessibility | Full | `prefers-reduced-motion` respected |
  93. | Layout shifts | Zero | No width/height animations |
  94. | Keyboard support | Full | Focus states, navigation |
  95. ## Framework Support
  96. | Framework | Version | Status |
  97. |-----------|---------|--------|
  98. | React | 19+ | Full support |
  99. | Next.js | 15+ | Full support (App Router) |
  100. | Svelte | 5+ | Full support |
  101. | Astro | 4+ | Full support |
  102. | Vue | 3+ | Use `motion-v` package |
  103. | Vanilla JS | ES2020+ | Via `motion` package |
  104. ## Contributing
  105. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. The short version: add examples in `examples/`, expand API docs in `reference/`, or create templates in `templates/`.
  106. ## License
  107. [MIT](LICENSE)
  108. ---
  109. <div align="center">
  110. Built by [Boris Djordjevic](https://github.com/longevityboris) at [199 Biotechnologies](https://github.com/199-biotechnologies) | [Paperfoot AI](https://paperfoot.ai)
  111. [![Star this repo](https://img.shields.io/github/stars/199-biotechnologies/motion-dev-animations-skill?style=for-the-badge&logo=github&label=%E2%AD%90%20Star%20this%20repo&color=yellow)](https://github.com/199-biotechnologies/motion-dev-animations-skill/stargazers)
  112. [![Follow @longevityboris](https://img.shields.io/badge/Follow_%40longevityboris-000000?style=for-the-badge&logo=x&logoColor=white)](https://x.com/longevityboris)
  113. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.