skills/motion-and-animation/SKILL.md
Comprehensive motion and animation guide — Disney's 12 principles for web, animation performance rules (compositor-only, measurement, scroll), and interaction design patterns (microinteractions, transitions, loading states, gestures). Use when implementing, reviewing, or fixing UI animations, transitions, or motion.
npx skillsauth add ihj04982/my-cursor-settings motion-and-animationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Complete guide to web animation: principles for quality, performance rules for smoothness, and implementation patterns for common interactions.
Disney animators codified these in the 1930s. We use them to make pixels feel human.
| # | Principle | Web Application |
|---|-----------|-----------------|
| 1 | Squash & Stretch | Subtle deformation conveys weight in morphing elements — don't overdo it |
| 2 | Anticipation | Cues before action (pull-to-refresh hints, button compress before send) |
| 3 | Staging | Guide eye through sequential animation; dim backgrounds to focus |
| 4 | Straight Ahead & Pose to Pose | Define key poses (start, end, maybe midpoint); let browser interpolate |
| 5 | Follow Through & Overlapping | Springs add organic overshoot-and-settle; too much stagger feels slow |
| 6 | Slow In & Slow Out | ease-out for entrances, ease-in for exits, ease-in-out for deliberate |
| 7 | Arcs | Curved paths feel natural; best for hero moments and playful interactions |
| 8 | Secondary Action | Flourishes supporting the main action (sparkles, sound, particles) |
| 9 | Timing | Keep interactions <300ms; be consistent across similar elements |
| 10 | Exaggeration | Push past accuracy sparingly (onboarding, empty states, confirmations) |
| 11 | Solid Drawing | Shadows suggest depth; CSS perspective gives real 3D |
| 12 | Appeal | The sum of all techniques applied with care and taste |
transform, opacity| Priority | Category | Impact | |----------|----------|--------| | 1 | Never Patterns | CRITICAL | | 2 | Choose the Mechanism | CRITICAL | | 3 | Measurement | HIGH | | 4 | Scroll | HIGH | | 5 | Paint | MEDIUM-HIGH | | 6 | Layers | MEDIUM | | 7 | Blur & Filters | MEDIUM | | 8 | View Transitions | LOW | | 9 | Tool Boundaries | CRITICAL |
scrollTop, scrollY, or scroll eventsrequestAnimationFrame loops without a stop conditiontransform and opacity for motionIntersectionObserver for visibility and pausingwill-change temporarily and surgically| Duration | Use Case | |----------|----------| | 100-150ms | Micro-feedback (hovers, clicks) | | 200-300ms | Small transitions (toggles, dropdowns) | | 300-500ms | Medium transitions (modals, page changes) | | 500ms+ | Complex choreographed animations |
--ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* Entering */
--ease-in: cubic-bezier(0.55, 0, 1, 0.45); /* Exiting */
--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* Moving between */
--spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* Playful overshoot */
Skeleton screens (preserve layout):
function CardSkeleton() {
return (
<div className="animate-pulse">
<div className="h-48 bg-gray-200 rounded-lg" />
<div className="mt-4 h-4 bg-gray-200 rounded w-3/4" />
<div className="mt-2 h-4 bg-gray-200 rounded w-1/2" />
</div>
);
}
Progress bar:
function ProgressBar({ progress }: { progress: number }) {
return (
<div className="h-2 bg-gray-200 rounded-full overflow-hidden">
<motion.div
className="h-full bg-blue-600"
initial={{ width: 0 }}
animate={{ width: `${progress}%` }}
transition={{ ease: "easeOut" }}
/>
</div>
);
}
Toggle with spring:
function Toggle({ checked, onChange }) {
return (
<button
role="switch" aria-checked={checked}
onClick={() => onChange(!checked)}
className={`relative w-12 h-6 rounded-full transition-colors duration-200
${checked ? "bg-blue-600" : "bg-gray-300"}`}
>
<motion.span
className="absolute top-1 left-1 w-4 h-4 bg-white rounded-full shadow"
animate={{ x: checked ? 24 : 0 }}
transition={{ type: "spring", stiffness: 500, damping: 30 }}
/>
</button>
);
}
import { AnimatePresence, motion } from "framer-motion";
function PageTransition({ children, key }) {
return (
<AnimatePresence mode="wait">
<motion.div
key={key}
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: -20 }}
transition={{ duration: 0.3 }}
>
{children}
</motion.div>
</AnimatePresence>
);
}
Swipe to dismiss:
function SwipeCard({ children, onDismiss }) {
return (
<motion.div
drag="x"
dragConstraints={{ left: 0, right: 0 }}
onDragEnd={(_, info) => {
if (Math.abs(info.offset.x) > 100) onDismiss();
}}
className="cursor-grab active:cursor-grabbing"
>
{children}
</motion.div>
);
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.card {
transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
transform and opacity for motion (compositor-only)will-change used temporarily, not permanentlyprefers-reduced-motion respectedtransition: all never used — properties listed explicitlydevelopment
Conduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance. Use when auditing websites for accessibility, fixing WCAG violations, or implementing accessible design patterns.
research
Generate high-entropy research (자료조사) and ideas (아이디어) using Verbalized Sampling to avoid mode collapse and maximize creativity and novelty.
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
documentation
Sync documentation from source-of-truth (package.json, .env.example). Generates CONTRIB.md, RUNBOOK.md. Use when updating project docs or after adding scripts/env vars.