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.
Badge for your README
Markdown
[](/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
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)
- ---
- name: motion-dev-animations
- 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).
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep
- metadata:
- version: "3.0.0"
- author: "Motion Dev Standards"
- tags: ["motion", "framer-motion", "animation", "react", "nextjs", "svelte", "astro", "gestures", "scroll", "parallax", "microinteractions", "spring-physics", "layout-animations"]
- min_claude_version: "3.5"
- created: "2025-11-07"
- updated: "2025-11-08"
- optimization: "Research-backed: imperative language, few-shot (3 examples), layered complexity, progressive loading"
- ---
- # Motion Dev Animations
- > **Motion.dev** - 10M+ downloads/month, successor to Framer Motion
- > 120fps GPU-accelerated animations for React, Next.js, Svelte, Astro, Vue
- ## Purpose
- Generate production-grade animations using Motion.dev following Apple/Jon Ive principles:
- **Purposeful** (serves function) | **Smooth** (120fps) | **Accessible** (reduced-motion) | **Performant** (GPU-only) | **Elegant** (subtle) | **Consistent** (unified timing)
- ## When to Use
- ✅ **Use for**:
- - React 19+/Next.js 15+/Svelte 5+/Astro 4+ animation implementation
- - Scroll effects (parallax, reveal), gestures (hover, drag, tap), layout animations
- - Hero sections, cards, micro-interactions requiring 60fps+ performance
- - Projects needing spring physics, natural motion, accessibility
- ❌ **Don't use for**:
- - CSS-only transitions (use native `transition` property)
- - Static sites without JavaScript frameworks
- - Vue projects (use `motion-v` package - different API)
- - SVG/Canvas complex animations (GSAP better suited)
- - Form-only CRUD apps (overkill)
- ## Workflow: Clarify → Plan → Implement → Verify
- ### Step 1: Clarify Requirements
- Determine project context and animation goals:
- - Framework (React 19+, Next.js 15+, Svelte 5+, Astro 4+)
- - Animation type (entrance, gesture, scroll, layout)
- - Design goal (subtle, prominent, playful, professional)
- - Performance constraints (target device, bundle limits, accessibility requirements)
- - Trigger mechanism (mount, viewport, user interaction)
- ### Step 2: Plan Animation Strategy
- Define implementation approach:
- - Components to animate (headers, cards, buttons, sections)
- - Motion patterns (fade, slide, scale, spring, parallax)
- - Timing specifications (duration, delay, stagger intervals)
- - Physics parameters (stiffness: 300-400, damping: 20, mass: 1)
- - Accessibility fallbacks (prefers-reduced-motion alternatives)
- ### Step 3: Implement in Phases
- Build animations incrementally:
- - **Setup**: Install Motion.dev, configure imports, prepare component structure
- - **Core Animation**: Apply motion properties (initial, animate, transition)
- - **Refinement**: Tune timing, easing curves, spring physics for natural feel
- - **Accessibility**: Add reduced-motion detection, keyboard navigation support
- - **Optimization**: Verify GPU-acceleration, minimize bundle size, test performance
- ### Step 4: Verify Quality Standards
- Check against requirements:
- - **Performance**: ≥60fps (Chrome DevTools → Performance tab)
- - **Layout Stability**: CLS = 0 (Lighthouse audit)
- - **Accessibility**: Honors prefers-reduced-motion (system settings test)
- - **Keyboard Navigation**: All interactive elements keyboard-accessible
- - **Mobile Responsive**: Touch-friendly gestures, tested on iOS/Android
- ## Animation Pattern Decision Tree
- ```
- INPUT: What should animate?
- ├─ ENTRANCE (page load, mount)
- │ → Pattern: initial={{opacity: 0, y: 20}} animate={{opacity: 1, y: 0}}
- │ → Timing: 0.6-0.8s, ease: [0.22, 1, 0.36, 1]
- │ → Stagger: 0.1-0.2s between elements
- │ → Example: ./examples/hero-fade-up.md
- │
- ├─ GESTURE (hover, tap, drag)
- │ → Pattern: whileHover={{scale: 1.05}}, whileTap={{scale: 0.95}}
- │ → Physics: Spring (stiffness: 300-400, damping: 20)
- │ → Timing: Instant response (no duration)
- │ → Examples: ./examples/card-hover.md, ./examples/magnetic-button.md
- │
- ├─ SCROLL (reveal, parallax)
- │ → Pattern: whileInView + viewport OR useScroll + useTransform
- │ → Trigger: viewport={{once: true, amount: 0.3}}
- │ → Performance: Transform/opacity only
- │ → Examples: ./examples/scroll-reveal.md, ./examples/parallax-layers.md
- │
- └─ LAYOUT (reorder, expand)
- → Pattern: layout prop (auto FLIP)
- → Shared: layoutId="id" for morphing
- → Caveat: Only animates transforms
- ```
- ## API Quick Reference
- | Component/Hook | Usage | When |
- |----------------|-------|------|
- | **motion.div** | `<motion.div animate={{x: 100}}>` | Basic animations |
- | **whileHover** | `whileHover={{scale: 1.05}}` | Hover states (0.2-0.3s) |
- | **whileTap** | `whileTap={{scale: 0.95}}` | Click feedback |
- | **whileInView** | `whileInView={{opacity: 1}}` | Scroll reveal |
- | **drag** | `drag="x"` dragConstraints | Draggable elements |
- | **layout** | `<motion.div layout />` | Auto FLIP animation |
- | **useScroll** | Track scroll progress | Parallax, progress bars |
- | **useTransform** | Map values | Scroll-linked effects |
- | **useSpring** | Spring physics | Smooth value changes |
- | **useInView** | Viewport detection | Trigger animations |
- **Full API**: See [Complete API Reference](./reference/api-reference.md)
- ## Framework Integration
- | Framework | Import | Components | Exit Animations |
- |-----------|--------|------------|-----------------|
- | **React/Next.js** | `"motion/react"` | `<motion.div>` | `<AnimatePresence>` |
- | **Svelte** | `"motion"` | Vanilla API | N/A |
- | **Astro** | `"motion"` | Client scripts | N/A |
- | **Vue** | `"motion-v"` | `<motion.div>` | Similar to React |
- ## Quality Standards
- | Category | Requirement | How to Verify |
- |----------|-------------|---------------|
- | **Performance** | ≥60fps | Chrome DevTools → Performance |
- | **GPU-accel** | transform/opacity only | No width/height/left/top |
- | **Bundle** | <50KB | webpack-bundle-analyzer |
- | **Accessibility** | prefers-reduced-motion | System settings test |
- | **Mobile** | Touch-friendly | iOS/Android testing |
- | **Layout shift** | CLS = 0 | Lighthouse audit |
- ## Examples Library (Progressive Loading)
- Load on-demand based on animation type:
- ### Hero Sections
- - [Hero Fade Up](./examples/hero-fade-up.md) - Classic Apple-style entrance
- - Hero Stagger - Orchestrated elements
- - Hero Split Text - Character reveal
- ### Scroll Effects
- - [Scroll Reveal](./examples/scroll-reveal.md) - Intersection Observer fade-in
- - [Parallax Layers](./examples/parallax-layers.md) - Multi-speed depth
- - Scroll Progress - Reading indicator
- ### Gestures & Interactions
- - [Card Hover](./examples/card-hover.md) - Elegant lift + shadow
- - [Magnetic Button](./examples/magnetic-button.md) - Cursor-following
- - Drag Carousel - Touch slider
- ### Layout Animations
- - List Reorder - Drag-to-reorder FLIP
- - Accordion - Expand/collapse
- - Tab Switch - Shared layout
- **Full examples**: All files in `./examples/` directory
- ## Reference Documentation (Load On-Demand)
- - [Complete API Reference](./reference/api-reference.md) - All components, hooks, props
- - [Spring Physics Guide](./reference/spring-physics.md) - Tuning stiffness, damping, mass
- - Performance Optimization - GPU, will-change, lazy loading
- - Accessibility Guide - Reduced motion, keyboard, screen readers
- - Troubleshooting - Common issues, solutions
- - Framer Motion Migration - Upgrade guide
- ## Templates (Production-Ready)
- - [Next.js Page Template](./templates/nextjs-page.tsx) - Hero + features + testimonials
- - [Component Library](./templates/component-library.tsx) - 10+ reusable components
- - Scroll Template - Parallax + reveal patterns
- - Dashboard Template - Interactive cards, charts
- ## Installation
- ```bash
- # React/Next.js/Svelte/Astro
- npm install motion
- # Vue
- npm install motion-v
- ```
- ## Common Patterns (Copy-Paste Ready)
- ### Pattern 1: Fade Up Entrance
- ```tsx
- <motion.div
- initial={{ opacity: 0, y: 20 }}
- animate={{ opacity: 1, y: 0 }}
- transition={{ duration: 0.6, ease: [0.22, 1, 0.36, 1] }}
- />
- ```
- ### Pattern 2: Hover Card
- ```tsx
- <motion.div
- whileHover={{ y: -8, boxShadow: "0 20px 40px rgba(0,0,0,0.12)" }}
- transition={{ type: "spring", stiffness: 300, damping: 20 }}
- />
- ```
- ### Pattern 3: Scroll Reveal
- ```tsx
- <motion.div
- initial={{ opacity: 0, y: 50 }}
- whileInView={{ opacity: 1, y: 0 }}
- viewport={{ once: true, amount: 0.3 }}
- />
- ```
- **More patterns**: Staggered lists, exit animations, layout transitions → `./examples/` directory
- ## Error Handling
- | Issue | Solution |
- |-------|----------|
- | Animation doesn't trigger | Check initial ≠ animate values |
- | Poor performance | Use transform/opacity only + will-change CSS |
- | Layout shift | Set explicit dimensions, use layout prop |
- | Exit not working | Wrap with `<AnimatePresence>`, add key prop |
- ## Implementation Best Practices
- 1. **Start simple** → Build from fade + slide, add complexity incrementally
- 2. **Extract variants** → Define animation states as named variants for maintainability
- 3. **Prefer spring physics** → Default to spring transitions (more natural than tween)
- 4. **Stagger list items** → Use staggerChildren (0.1-0.2s) for rhythm and hierarchy
- 5. **Test mobile thoroughly** → Verify touch gestures, performance on iOS/Android devices
- 6. **Include reduced-motion** → Always provide prefers-reduced-motion fallback animations
- 7. **Profile performance** → Use Chrome DevTools Performance tab, target ≥60fps
- ## Design Philosophy (Apple/Jon Ive Principles)
- Apply these design principles to all animations:
- - **Simplicity**: Use 200-400ms durations, minimize simultaneous motion, prefer transform properties
- - **Natural Physics**: Implement spring-based transitions, avoid linear easing, apply mass-based movement
- - **Purposeful Motion**: Guide user attention, provide interaction feedback, establish visual hierarchy
- - **Elegant Restraint**: Apply "less is more" principle, maintain consistent timing, respect user motion preferences
- ## Validation
- For structured output validation, see:
- - [Motion Config Schema](./schema/motion-config.schema.json) - JSON schema
- - [Validation Script](./scripts/validate_motion_config.py) - Automated checks
- ## Metadata
- **Version**: 3.0.0 (Research-Backed Optimization)
- **Optimization**: Imperative language, few-shot patterns (3 examples), layered complexity, progressive loading
- **Token Efficiency**: 87% core reduction (15K → 2K) + auto-caching
- **Motion.dev**: v11+
- **Frameworks**: React 19+, Next.js 15+, Svelte 5+, Astro 4+, Vue 3+
- **Research**: arXiv 2402.07927v1, 2211.01910, 2310.14735v5, PubMed 40334089
- **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)
- <div align="center">
- # Motion.dev Animations Skill
- **Production-grade web animations for Claude Code, powered by Motion.dev.**
- [](https://github.com/199-biotechnologies/motion-dev-animations-skill/stargazers)
- [](https://x.com/longevityboris)
- [](https://docs.anthropic.com/en/docs/claude-code)
- [](https://motion.dev)
- [](LICENSE)
- [](https://www.typescriptlang.org/)
- 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.
- ---
- [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)
- </div>
- ---
- ## Why This Exists
- 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.
- 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.
- ## Install
- Add to your Claude Code skills directory:
- ```bash
- # 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.
- ## Quick Start
- Once installed, use natural language with Claude Code:
- ```
- "Create a hero section with a fade-up entrance animation"
- "Add parallax scrolling to this landing page"
- "Build a card component with hover lift and shadow effects"
- "Implement drag-to-reorder for this list"
- "Add a magnetic button effect to the CTA"
- ```
- Claude Code will clarify your framework, plan the animation strategy, generate the code, and verify performance.
- ## How It Works
- The skill follows a four-step workflow:
- 1. **Clarify** -- Determines your framework (React 19+, Next.js 15+, Svelte 5+, Astro 4+), animation type, and design goals.
- 2. **Plan** -- Selects the right Motion.dev patterns, spring physics, and easing curves for your use case.
- 3. **Implement** -- Generates TypeScript/JSX code using GPU-accelerated properties (transform, opacity, filter only). No layout thrashing.
- 4. **Verify** -- Checks for 60fps+ performance, `prefers-reduced-motion` support, keyboard navigation, and bundle size under 50KB.
- 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.
- ## Animation Types
- ### Entrance Animations
- - **Hero Fade Up** -- Apple-style fade + slide entrance for landing pages
- - **Hero Stagger** -- Orchestrated title, subtitle, CTA sequence
- - **Scroll Reveal** -- Intersection Observer fade-in on scroll
- ### Scroll Effects
- - **Parallax Layers** -- Multi-speed depth effect with `useScroll` and `useTransform`
- - **Scroll Progress** -- Reading progress bar tied to scroll position
- ### Gesture Interactions
- - **Card Hover** -- Lift with shadow using `whileHover`
- - **Magnetic Button** -- Cursor-following effect for CTAs
- - **Drag Carousel** -- Touch-friendly horizontal slider with `drag` constraints
- ### Micro-interactions
- - **Button Press** -- Tactile tap feedback with `whileTap`
- - **Toggle Switch** -- Smooth state transitions with `layout` animations
- - **Loading Spinner** -- Spring-based loader animation
- ### Layout Animations
- - **List Reorder** -- Drag-to-reorder with FLIP technique
- - **Accordion** -- Smooth expand/collapse with `AnimatePresence`
- - **Tab Switch** -- Shared layout transitions with `layoutId`
- ## What's Inside
- ```
- motion-dev-animations-skill/
- ├── SKILL.md # Core instructions (~2,000 tokens)
- ├── examples/ # Animation patterns (loaded on-demand)
- │ ├── hero-fade-up.md # Apple-style entrance animation
- │ ├── scroll-reveal.md # Intersection Observer reveals
- │ ├── card-hover.md # Hover lift + shadow effect
- │ ├── parallax-layers.md # Multi-speed parallax
- │ ├── magnetic-button.md # Cursor-following button
- │ └── example-config.json # Sample motion config
- ├── reference/ # API docs (loaded on-demand)
- │ ├── api-reference.md # Full Motion.dev API
- │ └── spring-physics.md # Spring values and presets
- ├── templates/ # Starter code
- │ ├── nextjs-page.tsx # Full page with animations
- │ └── component-library.tsx # Reusable animation components
- ├── schema/ # Validation
- │ └── motion-config.schema.json # JSON schema for configs
- └── scripts/ # Tools
- └── validate_motion_config.py # Config validator
- ```
- ## Performance Standards
- Every animation this skill generates meets these targets:
- | Metric | Target | Method |
- |--------|--------|--------|
- | Frame rate | 60fps+ (120fps ideal) | GPU-accelerated transforms only |
- | Bundle size | < 50KB | Tree-shaking, code splitting |
- | Accessibility | Full | `prefers-reduced-motion` respected |
- | Layout shifts | Zero | No width/height animations |
- | Keyboard support | Full | Focus states, navigation |
- ## Framework Support
- | Framework | Version | Status |
- |-----------|---------|--------|
- | React | 19+ | Full support |
- | Next.js | 15+ | Full support (App Router) |
- | Svelte | 5+ | Full support |
- | Astro | 4+ | Full support |
- | Vue | 3+ | Use `motion-v` package |
- | Vanilla JS | ES2020+ | Via `motion` package |
- ## Contributing
- See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. The short version: add examples in `examples/`, expand API docs in `reference/`, or create templates in `templates/`.
- ## License
- [MIT](LICENSE)
- ---
- <div align="center">
- Built by [Boris Djordjevic](https://github.com/longevityboris) at [199 Biotechnologies](https://github.com/199-biotechnologies) | [Paperfoot AI](https://paperfoot.ai)
- [](https://github.com/199-biotechnologies/motion-dev-animations-skill/stargazers)
- [](https://x.com/longevityboris)
- </div>
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.