199-biotechnologies/motion-dev-animations-skill
motion-dev-animations
VerifiedCreates 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).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.1 KB |
| examples/card-hover.md | markdown | 7.1 KB |
| examples/example-config.json | config | 631 B |
| examples/hero-fade-up.md | markdown | 4.1 KB |
| examples/magnetic-button.md | markdown | 9.0 KB |
| examples/parallax-layers.md | markdown | 9.2 KB |
| examples/scroll-reveal.md | markdown | 6.8 KB |
| scripts/validate_motion_config.pyexecutable | script | 4.8 KB |
| templates/component-library.tsx | other | 10.2 KB |
| templates/nextjs-page.tsx | other | 7.3 KB |
examples/hero-fade-up.md
View on GitHub# Hero Fade Up - Classic Apple-Style Animation
**Design Principle**: Simplicity and elegance. Elements gently fade in while sliding up, creating a sense of content emerging from below.
**Use Case**: Landing pages, product launches, portfolio hero sections
**Performance**: GPU-accelerated (transform + opacity only), 60fps+
---
## React / Next.js Implementation
```tsx
import { motion } from "motion/react"
export function HeroFadeUp() {
return (
<section className="min-h-screen flex items-center justify-center bg-black text-white">
<div className="max-w-4xl px-8 text-center">
{/* Title */}
<motion.h1
className="text-6xl md:text-8xl font-bold mb-6"
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{
duration: 0.8,
ease: [0.22, 1, 0.36, 1], // Custom ease-out curve
}}
>
Think Different
</motion.h1>
{/* Subtitle */}
<motion.p
className="text-xl md:text-2xl text-gray-400 mb-8"
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{
duration: 0.8,
delay: 0.1, // Stagger after title
ease: [0.22, 1, 0.36, 1],
}}
>
The people who are crazy enough to think they can change the world
are the ones who do.
</motion.p>
{/* CTA Button */}
<motion.button
className="px-8 py-4 bg-white text-black rounded-full font-medium hover:bg-gray-200 transition-colors"
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{
duration: 0.8,
delay: 0.2, // Stagger after subtitle
ease: [0.22, 1, 0.36, 1],
}}
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
>
Learn More
</motion.button>
</div>
</section>
)
}
```
---
## Vanilla JavaScript / Astro
```javascript
import { animate, stagger } from "motion"
// Animate all hero elements on page load
const heroElements = document.querySelectorAll(".hero-element")
animate(
heroElements,
{ opacity: [0, 1], y: [20, 0] },
{
duration: 0.8,
easing: [0.22, 1, 0.36, 1],
delay: stagger(0.1), // 0.1s between each element
}
)
```
**HTML**:
```html
<section class="hero">
<h1 class="hero-element">Think Different</h1>
<p class="hero-element">The people who are crazy enough...</p>
<button class="hero-element">Learn More</button>
</section>
```
---
## With Reduced Motion Support
```tsx
import { motion, useReducedMotion } from "motion/react"
export function AccessibleHeroFadeUp() {
const shouldReduceMotion = useReducedMotion()
const animationProps = shouldReduceMotion
? {} // No animation if user prefers reduced motion
: {
initial: { opacity: 0, y: 20 },
animate: { opacity: 1, y: 0 },
transition: { duration: 0.8, ease: [0.22, 1, 0.36, 1] },
}
return (
<motion.h1 {...animationProps}>
Think Different
</motion.h1>
)
}
```
---
## Customization Options
### Faster Animation (Snappier Feel)
```tsx
transition={{ duration: 0.4, ease: [0.22, 1, 0.36, 1] }}
```
### Softer Animation (More Dramatic)
```tsx
transition={{ duration: 1.2, ease: [0.22, 1, 0.36, 1] }}
```
### Larger Distance (More Dramatic Entry)
```tsx
initial={{ opacity: 0, y: 40 }} // Start further down
```
### Spring Physics (Natural Bounce)
```tsx
transition={{
type: "spring",
stiffness: 100,
damping: 20,
}}
```
---
## Design Notes
**Why this works:**
- **Opacity fade** - Gentle appearance, not jarring
- **Small y offset** (20px) - Subtle movement, not dramatic
- **Ease-out curve** - Starts fast, ends slow (natural deceleration)
- **Stagger delay** - Creates reading order hierarchy
- **GPU-accelerated** - Uses transform, not top/margin
**When to use:**
- Landing pages
- Product hero sections
- Portfolio headers
- Blog post headers
- Feature announcements
**Avoid when:**
- User has prefers-reduced-motion
- Page has many simultaneous animations
- Content is critical (don't delay important info)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |