motion-design/SKILL.md
Animation and micro-interaction standards for web, Android, and iOS. Covers timing rules (100/300/500), easing curves, GPU-accelerated animation, staggered entrances, state transitions, loading states, and mandatory prefers-reduced-motion...
npx skillsauth add peterbamuhigire/skills-web-dev motion-designInstall 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.
motion-design or would be better handled by a more specific companion skill.SKILL.md first, then load only the referenced deep-dive files that are necessary for the task.| Companion Skill | When to Load |
|---|---|
| practical-ui-design | Visual system (colour, type, spacing) |
| jetpack-compose-ui | Android Compose animation APIs |
| swiftui-design | SwiftUI animation/transition APIs |
| webapp-gui-design | Web app CSS/JS animation |
| ai-slop-prevention | Validate animations aren't AI slop |
| frontend-performance | Measure animation frame rates |
| Category | Duration | Use For | |---|---|---| | Feedback | 100-150ms | Button press, toggle, checkbox, hover | | State change | 200-300ms | Accordion, tab switch, dropdown, modal appear | | Layout shift | 300-500ms | Page transition, panel expand, reorder | | Entrance | 500-800ms | Hero content, first-time reveal, onboarding |
Exit duration = ~75% of enter duration. Users care less about things leaving than arriving.
| Curve | CSS Value | When to Use |
|---|---|---|
| ease-out-quart | cubic-bezier(0.25, 1, 0.5, 1) | Default for most entrances and micro-interactions |
| ease-out-quint | cubic-bezier(0.22, 1, 0.36, 1) | Snappy feedback (toggles, checkboxes) |
| ease-out-expo | cubic-bezier(0.16, 1, 0.3, 1) | Dramatic entrances, hero content |
| ease-in-quart | cubic-bezier(0.5, 0, 0.75, 0) | Exit animations |
| ease-in-out | cubic-bezier(0.4, 0, 0.2, 1) | Toggles, state changes, position swaps |
| Curve | Why |
|---|---|
| bounce / elastic | Dated, tacky — the #1 AI animation fingerprint |
| linear | Mechanical, unnatural (except for continuous rotation) |
| ease (CSS default) | Too gentle, feels mushy |
| Custom springs with visible oscillation | Distracting, unprofessional |
| Property | Use For |
|---|---|
| transform: translate() | Position changes, slide in/out |
| transform: scale() | Grow/shrink, emphasis |
| transform: rotate() | Spin, flip, tilt |
| opacity | Fade in/out, reveal/hide |
These run on the GPU compositor — no layout recalculation, no jank.
| Property | Why |
|---|---|
| width, height | Triggers layout recalculation every frame |
| top, left, right, bottom | Triggers layout recalculation every frame |
| margin, padding | Triggers layout recalculation every frame |
| border-width, border-radius | Triggers paint every frame |
| font-size | Triggers layout + paint + composite |
| box-shadow (animated) | Expensive paint operation |
Alternative: Use transform: scale() instead of animating width/height. Use transform: translate() instead of animating position.
opacity: 0 → 1 (200-300ms, ease-out-quart)translate(0, 16px) → translate(0, 0) + fade (300-500ms)scale(0.95) → scale(1) + fade (200-300ms)scale(0.97) on :active (100ms, ease-out-quint)max-height or CSS grid trick (250-300ms)translate(-4px) → translate(4px) x2 (300ms)/* Set index via inline style or CSS custom property */
.stagger-item {
--i: 0; /* set per element: style="--i: 0", style="--i: 1", etc. */
animation: fadeSlideUp 300ms ease-out both;
animation-delay: calc(var(--i) * 60ms);
}
@keyframes fadeSlideUp {
from {
opacity: 0;
transform: translateY(12px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
Rules:
35%+ of adults over 40 experience vestibular sensitivity. This is not optional.
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
| Normal | Reduced Motion | |---|---| | Slide + fade entrance | Instant appear (or very fast fade, 100ms) | | Position transitions | Instant position change | | Parallax scrolling | Static positioning | | Auto-playing video/animation | Paused with play button | | Continuous rotation/pulse | Static state |
Start animations before data arrives. Show optimistic UI immediately, update when data loads.
Animate to ~90% quickly, slow the last 10%. Progress feels faster even if total time is the same.
Apply state changes immediately in the UI. Roll back only if the server rejects.
User taps "Like" → Heart fills instantly → API call fires in background
→ If fails, revert heart + show error
will-change sparingly (only on elements about to animate)requestAnimationFrame for frame-synced updatesanimateFloatAsState, animateContentSize, AnimatedVisibilityAnimatable for interruptible animationsspring() for physics-based (use stiffness, not bounce)LocalReducedMotion.current (Compose 1.7+).animation() modifier or withAnimation {}.spring(duration:bounce:) — keep bounce at 0 for professional feelmatchedGeometryEffect for shared element transitionsUIAccessibility.isReduceMotionEnabledBefore shipping animations:
prefers-reduced-motion provides meaningful alternativeSources: Impeccable motion-design reference (Bakaus, 2025); Material Design Motion guidelines; Apple Human Interface Guidelines — Motion.
data-ai
Use when adding AI-powered analytics to a SaaS platform — semantic search over business data, natural language queries, trend detection, anomaly alerts, and AI-generated insights for dashboards. Covers embeddings, NL2SQL, and per-tenant analytics...
data-ai
Design AI-powered analytics dashboards — what metrics to show, how to display AI predictions and confidence, drill-down patterns, KPI cards, trend visualisation, AI Insights panels, export design, and role-based dashboard variants. Invoke when...
development
Use when designing, building, reviewing, or upgrading production software systems that must be secure, performant, maintainable, scalable, and user-centered. Apply before writing specs, code, architecture, APIs, databases, mobile apps, SaaS platforms, or ERP systems.
development
Professional web app UI using commercial templates (Tabler/Bootstrap 5) with strong frontend design direction when needed. Use for CRUD interfaces, dashboards, admin panels with SweetAlert2, DataTables, Flatpickr. Clone seeder-page.php, use...