ui-animation
Motion design and animation for user interfaces. Use when creating micro-interactions, page transitions, loading states, or any UI animation across web and mobile platforms.
What this skill does
# UI Animation & Motion Design
Comprehensive guide for creating purposeful, performant animations in user interfaces.
## Animation Principles
### The 12 Principles of Animation (Applied to UI)
| Principle | UI Application |
| -------------------- | ------------------------------------- |
| **Timing** | Duration reflects importance/distance |
| **Easing** | Natural acceleration/deceleration |
| **Anticipation** | Visual preparation for action |
| **Follow-through** | Momentum continues after stop |
| **Secondary Action** | Supporting elements respond |
| **Staging** | Draw attention to key element |
| **Squash & Stretch** | Bouncy, playful interactions |
| **Exaggeration** | Emphasize important feedback |
| **Arc** | Natural curved motion paths |
| **Overlap** | Elements move at different rates |
| **Solid Drawing** | Maintain consistent 3D space |
| **Appeal** | Engaging, delightful motion |
### Why Animate?
```
FUNCTIONAL PURPOSES:
✓ Guide attention to important changes
✓ Show relationships between elements
✓ Provide feedback for actions
✓ Communicate system status
✓ Ease cognitive load
✓ Create spatial orientation
NOT FOR:
✗ Pure decoration
✗ Showing off skills
✗ Making things "feel modern"
✗ Distracting from content
```
---
## Timing & Duration
### Duration Guidelines
```
INSTANT (0-100ms):
└─→ Button state changes
└─→ Toggle switches
└─→ Micro-feedback
FAST (100-200ms):
└─→ Hover effects
└─→ Simple fades
└─→ Small movements
STANDARD (200-300ms):
└─→ Most UI transitions
└─→ Modal open/close
└─→ Dropdown menus
SLOW (300-500ms):
└─→ Complex transitions
└─→ Page transitions
└─→ Large element movement
DELIBERATE (500ms+):
└─→ Hero animations
└─→ Skeleton loading
└─→ Onboarding sequences
```
### Distance-Based Timing
```
Rule: Longer distance = Longer duration
Small (< 100px): 150-200ms
Medium (100-300px): 200-300ms
Large (300-500px): 300-400ms
Full screen: 400-500ms
Formula:
duration = baseTime + (distance × factor)
```
---
## Easing Functions
### Standard Easings
```
LINEAR
├────────────────────────────┤
Constant speed. Rarely natural.
Use: Progress bars, clock hands
EASE-OUT (Deceleration)
├═══════════────────────────┤
Fast start, slow end.
Use: Elements entering the screen
EASE-IN (Acceleration)
├────────────────═══════════┤
Slow start, fast end.
Use: Elements leaving the screen
EASE-IN-OUT (S-curve)
├────═══════════════────────┤
Slow start and end, fast middle.
Use: On-screen transitions
EASE-OUT-BACK (Overshoot)
├═══════════────────────╗───┤
Overshoots, settles back.
Use: Playful entrances, bounces
```
### CSS Easing Values
```css
/* Built-in keywords */
linear: cubic-bezier(0, 0, 1, 1)
ease: cubic-bezier(0.25, 0.1, 0.25, 1)
ease-in: cubic-bezier(0.42, 0, 1, 1)
ease-out: cubic-bezier(0, 0, 0.58, 1)
ease-in-out: cubic-bezier(0.42, 0, 0.58, 1)
/* Material Design standard */
standard: cubic-bezier(0.4, 0, 0.2, 1)
decelerate: cubic-bezier(0, 0, 0.2, 1)
accelerate: cubic-bezier(0.4, 0, 1, 1)
/* Custom: Snappy */
snappy: cubic-bezier(0.5, 0, 0, 1)
/* Custom: Bouncy */
bouncy: cubic-bezier(0.68, -0.55, 0.27, 1.55)
/* Spring-like (use JS libraries) */
spring: { stiffness: 300, damping: 20 }
```
### When to Use Each
| Scenario | Easing | Why |
| ------------------ | ------------- | ------------------------------ |
| Element entering | ease-out | Arrives energetically, settles |
| Element leaving | ease-in | Gathers momentum to exit |
| On-screen change | ease-in-out | Smooth state change |
| Attention grabbing | bounce/spring | Playful, noticeable |
| Background/subtle | ease-out | Unobtrusive |
---
## Animation Patterns
### Micro-interactions
```
BUTTON STATES:
┌─────────────────────────────────────────┐
│ Rest → Hover: scale(1.02), 100ms │
│ Hover → Active: scale(0.98), 50ms │
│ Active → Rest: scale(1), 150ms ease-out │
└─────────────────────────────────────────┘
TOGGLE SWITCH:
┌─────────────────────────────────────────┐
│ Thumb: translateX, 200ms ease-out │
│ Track: background-color, 200ms │
│ State: slight bounce at end │
└─────────────────────────────────────────┘
CHECKBOX:
┌─────────────────────────────────────────┐
│ Check mark: stroke-dashoffset animation │
│ Background: scale from center, 150ms │
│ Ripple: expanding circle, 300ms │
└─────────────────────────────────────────┘
```
### Loading States
```
SKELETON SCREENS:
┌──────────────────────────┐
│ ▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░ │ Shimmer effect
│ ▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░ │ Linear gradient
│ ▓▓▓▓▓▓░░░░░░░░░░░░░░░░ │ Moving left to right
└──────────────────────────┘
CSS:
background: linear-gradient(
90deg,
#f0f0f0 25%,
#e0e0e0 50%,
#f0f0f0 75%
);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
SPINNER:
- Duration: 1-2 seconds per rotation
- Easing: linear (consistent motion)
- Style: Match brand identity
```
### Page Transitions
```
CROSSFADE:
├──────────────────────────────────────────┤
│ Old page: opacity 1 → 0, 200ms │
│ New page: opacity 0 → 1, 200ms │
│ Timing: Sequential or overlapping │
└──────────────────────────────────────────┘
SLIDE:
├──────────────────────────────────────────┤
│ Direction follows navigation hierarchy │
│ Forward: Slide left (new from right) │
│ Back: Slide right (prev from left) │
│ Duration: 300-400ms │
└──────────────────────────────────────────┘
SHARED ELEMENT:
├──────────────────────────────────────────┤
│ Element morphs between states │
│ Position, size, border-radius change │
│ Creates continuity between screens │
│ Duration: 300-500ms │
└──────────────────────────────────────────┘
```
### List Animations
```
STAGGERED ENTRANCE:
┌─ Item 1 ────────────────┐ delay: 0ms
├─ Item 2 ────────────────┤ delay: 50ms
├─ Item 3 ────────────────┤ delay: 100ms
├─ Item 4 ────────────────┤ delay: 150ms
└─ Item 5 ────────────────┘ delay: 200ms
Max total duration: 500ms
Stagger: 30-50ms per item
Animation: translateY + opacity
REORDER:
- Use FLIP technique
- Duration: 200-300ms
- Ease: ease-out
```
---
## Performance
### GPU-Accelerated Properties
```
FAST (Compositor only):
✓ transform: translate, scale, rotate
✓ opacity
✓ filter (with will-change)
SLOW (Triggers layout/paint):
✗ width, height
✗ margin, padding
✗ top, left, right, bottom
✗ border, border-radius
✗ font-size
✗ box-shadow (repaints)
OPTIMIZATION:
will-change: transform, opacity;
/* Use sparingly! */
```
### Performance Guidelines
```css
/* Good: GPU-accelerated */
.animated-element {
transform: translateX(0);
transition: transform 300ms ease-out;
}
.animated-element.moved {
transform: translateX(100px);
}
/* Bad: Layout thrashing */
.animated-element {
left: 0;
transition: left 300ms ease-out;
}
.animated-element.moved {
left: 100px;
}
```
### FLIP Technique
```javascript
// First: Get initial position
const first = element.getBoundingClientRect();
// Last: Apply change, get final position
element.classList.add("moved");
const last = element.getBoundingClientRect();
// Invert: Calculate delta, apply inverse transform
const deltaX = first.left - last.left;
const deltaY = first.top - last.top;
element.style.transform = `translate(${deltaX}px, ${deltaY}px)`;
// Play: Remove transform with transition
requestAnimationFrame(() => {
element.style.transition = "transform 300ms ease-out";
element.style.transform = "";
});
```
---
## CSS Animation Techniques
### Keyframe Animation
```css
@keyframes fadeSlideIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.element {
aniRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.