skills/motion-design-principles/SKILL.md
Three-tier animation decision framework, composition rules, anti-patterns, and responsive animation principles. Foundation for all motion work.
npx skillsauth add adilkalam/orca motion-design-principlesInstall 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.
Choose the SIMPLEST tier that achieves the effect. Never escalate without reason.
Use when: Simple reveals, hover effects, viewport-triggered fades.
Technology: CSS animation-timeline: scroll(), @keyframes, transition.
Advantages: Zero JS, best performance, compositor-only.
/* Tier 1 example: simple fade-up on scroll */
@keyframes fade-up {
from { opacity: 0; transform: translateY(var(--motion-reveal-distance, 40px)); }
to { opacity: 1; transform: translateY(0); }
}
.reveal-on-scroll {
animation: fade-up linear both;
animation-timeline: view();
animation-range: entry 0% entry 30%;
}
Decision: If a simple CSS scroll-driven animation achieves the effect, STOP HERE.
Use when: Choreographed sequences, pinning, horizontal scroll, split text, staggered children, scrub-linked animations. Technology: GSAP 3 + ScrollTrigger plugin + optionally SplitText, Flip. Advantages: Timeline control, pin support, scrub, responsive via matchMedia.
Decision: If the effect needs timeline choreography, scrub, or pinning, use GSAP.
Use when: 3D scenes, particle systems, model rendering, camera scroll animation. Technology: [email protected] (vanilla, NOT React Three Fiber). Advantages: Full 3D, GPU-powered, immersive experiences.
Decision: Only when the effect is inherently 3D. Never for 2D scroll effects.
motion.duration.stagger (default 0.12s)| Context | Easing | Design-DNA Token |
|---------|--------|-----------------|
| Element entering viewport | Decelerate | motion.easing.entrance |
| Element leaving viewport | Accelerate | motion.easing.exit |
| Emphasis/attention | Elastic/bounce | motion.easing.emphasis |
| Continuous/scrub | Linear or none | motion.easing.smooth |
motion.duration.fast (0.3s)motion.duration.normal (0.6s)motion.duration.slow (1.0s)motion.duration.stagger (0.12s)gsap.matchMedia() for responsive animation differenceswill-change sparingly and remove after animation completestransform and opacity when possible (compositor-only)prefers-reduced-motion: disable or simplify animationsScrollTrigger.batch() for many identical reveal animationsscrub and toggleActions on the same ScrollTriggerwidth, height, top, left) -- use transformstransition: all -- list specific propertiestl.revert() or ScrollTrigger.kill() on unmount// WRONG: ScrollTrigger on individual tweens inside timeline
const tl = gsap.timeline();
tl.to('.a', { y: 0, scrollTrigger: { trigger: '.a' } }); // BUG
tl.to('.b', { y: 0, scrollTrigger: { trigger: '.b' } }); // BUG
// RIGHT: ScrollTrigger on the timeline itself
const tl = gsap.timeline({
scrollTrigger: { trigger: '.section', start: 'top center' }
});
tl.to('.a', { y: 0 });
tl.to('.b', { y: 0 });
// WRONG: No cleanup
useEffect(() => {
gsap.to('.element', { scrollTrigger: { ... } });
}, []);
// RIGHT: Context-based cleanup
useEffect(() => {
const ctx = gsap.context(() => {
gsap.to('.element', { scrollTrigger: { ... } });
}, containerRef);
return () => ctx.revert();
}, []);
// WRONG: Same animation at all viewport sizes
gsap.to('.hero', { x: 500 });
// RIGHT: Responsive via matchMedia
gsap.matchMedia().add('(min-width: 768px)', () => {
gsap.to('.hero', { x: 500 });
});
gsap.matchMedia().add('(max-width: 767px)', () => {
gsap.to('.hero', { x: 200 });
});
gsap.matchMedia() for viewport-dependent animationsprefers-reduced-motion and provide fallbackScrollTrigger.batch() for repeated revealstransform and opacity for 60fpsScrollTrigger.create() with lazy refresh for off-screen contentpinSpacing: true (default) unless layout requires otherwisecontent-media
Download YouTube video transcripts when user provides a YouTube URL or asks to download/get/fetch a transcript from YouTube. Also use when user wants to transcribe or get captions/subtitles from a YouTube video.
development
Web UI quality rules: interactions, forms, loading, animations, layout, content, performance, accessibility, design. Apply to all web UI work. Adapted from Vercel Design Guidelines.
testing
MANDATORY protocol enforcing knowledge check before EVERY response - prevents explaining systems without reading docs, claiming without verification, and ignoring auto-loaded context
testing
Typography hierarchy and spacing scale fallbacks. Yields to project design-dna when present.