animation-recipes

دستورهای آماده برای طراحی انیمیشن‌های UI، ترنزیشن و موشن ویدیو

این Skill مجموعه‌ای از recipeهای آماده برای سناریوهای رایج UI است؛ از فشردن دکمه و نمایش موفقیت تا ورود modal، تغییر صفحه، stagger لیست، hover کارت و انیمیشن فرم. هر recipe شامل duration، easing و اصول حرکتی مناسب برای پیاده‌سازی production-ready است.

پارامترها بر اساس emotion، محدودیت‌های brand، platform و accessibility تنظیم می‌شوند و برای web، video، موبایل و reduced motion راهنمایی مشخص دارند. این Skill کمک می‌کند سریع‌تر به موشن منسجم، قابل‌دسترس و سازگار با استانداردهای طراحی برسید.

چه چیزی می‌گیرید

  • recipeهای آماده برای feedback، navigation، content و form animation
  • مقادیر پیشنهادی duration، easing، stagger و اصول حرکتی
  • الگوهای جداگانه برای web، video، موبایل و reduced motion
  • قواعد تطبیق انیمیشن با شخصیت برند مانند elegant، professional و playful
  • چک‌لیست performance برای استفاده از transform، opacity و requestAnimationFrame

برای چه کاری خوب است

  • توسعه‌دهندگان frontend که برای تعاملات رایج به timing و easing مطمئن نیاز دارند
  • طراحان محصولی که می‌خواهند یک سیستم موشن منسجم برای UI تعریف کنند
  • تیم‌هایی که برای landing page، فرم، modal یا page transition به الگوی آماده نیاز دارند
  • پروژه‌های ویدیویی که باید transitionهای کوتاه و شروع فوری محتوا داشته باشند

برای چه کاری نیست

  • ساخت انیمیشن‌های کاملاً سفارشی و پیچیده بدون استفاده از recipeهای رایج
  • پروژه‌هایی که به تولید مستقیم فایل ویدیویی یا کدنویسی کامل وابسته‌اند
  • موشن‌هایی که نیازمند art direction، illustration یا شخصیت‌پردازی اختصاصی هستند

دربارهٔ این اسکیل

Animation Recipes

Complete catalog of pre-built animation recipes for common UI scenarios. Each recipe combines duration, easing, and Disney principles into production-ready animations.

Choice Resolution

Recipes provide base values that get transformed through the resolution pipeline:

Recipe (base) → Emotion (modifier) → Brand (constraint) → Platform (adaptation) → Bounds → Accessibility (override)

Resolution Order

  1. Recipe provides base - duration, easing, principles
  2. Emotion modifies - multiplies duration, may override easing
  3. Brand constrains - caps exaggeration, may disable features
  4. Platform adapts - applies duration multiplier (video = 0.6×)
  5. Bounds clamp - enforces M3 limits (50-600ms web, 50-400ms video)
  6. Accessibility overrides - reduced motion bypasses all above

Video Platform Integration

When platform === "video":

ParameterAdjustment
Duration× 0.6 (faster for engagement)
Max duration400ms (not 600ms)
Intro delay0ms (content on first frame)
Transitions3-6 frames max

Worked Example

Input: success-notification + celebratory emotion + professional brand + video platform

1. Recipe base:      300ms, spring-bouncy
2. + Celebratory:    300 × 1.2 = 360ms
3. + Professional:   exaggeration capped to "subtle", no particles
4. + Video:          360 × 0.6 = 216ms
5. + Bounds:         216ms (within 50-400ms) ✓
6. Final:            216ms, spring-bouncy, subtle exaggeration

See choice-resolution/ skill for full algorithm.

Recipe Catalog

Feedback Animations

Button Press

Use case: Tactile feedback for button interactions

PropertyValue
Durationshort-4 (200ms)
Easingemphasized-decelerate
PrinciplesAnticipation (micro), Squash-stretch (subtle)

Brand Constraints:

  • Elegant: No squash, subtle scale (0.98), caps exaggeration
  • Playful: Bounce with overshoot, scale 0.92 -> 1.05, allows all features
  • Bold: Quick snap, scale 0.95 -> 1.02, allows expressive effects

Success Notification

Use case: Celebratory feedback for completed actions

PropertyValue
Durationmedium-2 (300ms)
Easingspring-bouncy
PrinciplesAnticipation, Squash-stretch, Follow-through, Secondary glow

Error Shake

Use case: Attention-grabbing error feedback

PropertyValue
Durationshort-3 (150ms)
Easingstandard
PrinciplesExaggeration (moderate), Secondary color flash

Navigation Animations

Modal Entrance

Use case: Dialog/overlay appearance

PropertyValue
Durationmedium-1 (250ms)
Easingemphasized-decelerate
PrinciplesAnticipation (micro), Staging, Backdrop secondary

Page Transition

Use case: Route change animations

PropertyValue
Durationmedium-2 (300ms)
Exit Easingemphasized-accelerate
Enter Easingemphasized-decelerate
PrinciplesStaging (shared-axis), Follow-through

Direction Patterns:

  • Forward: Exit left, enter from right
  • Backward: Exit right, enter from left
  • Up/Down: Vertical variants for hierarchical navigation

Content Animations

List Stagger

Use case: Multiple items entering sequentially

PropertyValue
Durationmedium-1 (250ms) per item
Stagger50ms base (adaptive)
Easingemphasized-decelerate
PrinciplesFollow-through (stagger), Overlap 30%

Adaptive Stagger Formula:

staggerDelay = min(50ms, max(25ms, 800ms / itemCount))

Card Hover

Use case: Interactive card states

PropertyValue
Durationshort-3 (150ms)
Easingstandard-decelerate
PrinciplesExaggeration (subtle), Shadow secondary

Hero Reveal

Use case: Landing page hero entrance

PropertyValue
Durationmedium-3 (350ms) total
Easingemphasized-decelerate
PrinciplesAnticipation, Staging, Cascading follow-through

Sequence:

  1. Background fade (0ms)
  2. Headline slide-up (100ms delay)
  3. Subhead slide-up (200ms delay)
  4. CTA scale-in (350ms delay)

Form Animations

Input Focus

Use case: Form field focus state

PropertyValue
Durationshort-3 (150ms)
Easingstandard-decelerate
PrinciplesSecondary label float, Border highlight

Checkbox Toggle

Use case: Checkbox state animation

PropertyValue
Durationshort-3 (150ms)
Easingemphasized-decelerate
PrinciplesAnticipation (micro), Draw animation

Switch Toggle

Use case: Toggle switch animation

PropertyValue
Durationshort-4 (200ms)
Easingspring-snappy
PrinciplesSquash-stretch, Follow-through (knob)

Recipe Selection Guide

By Interaction Type

InteractionRecipe
Button clickbutton-press
Success feedbacksuccess-notification
Error feedbackerror-shake
Open dialogmodal-entrance
Close dialogmodal-exit
Navigate forwardpage-transition (forward)
Navigate backpage-transition (backward)
Load listlist-stagger
Card interactioncard-hover
First impressionhero-reveal
Form focusinput-focus
Toggle statecheckbox-toggle or switch-toggle
Milestonecelebration

By Brand Personality (Constraints)

Brands apply constraints (caps and restrictions), not multipliers:

BrandMax ExaggerationSquashParticlesBounce
Elegantsubtle✗✗✗
Professionalsubtle✗✗✗
Friendlymoderate✓✓✓
Playfulexpressive✓✓✓
Boldexpressive✓✓✓

By Device Context

ContextAdjustments
MobileIncrease duration 1.1x, reduce distance
TabletStandard timing
DesktopStandard timing
Low-end deviceSimplify to opacity-only, reduce particles
Reduced motionUse instant or fade-only variants

Video-Specific Guidelines

Scene Start Timing

CRITICAL: Videos should start with content immediately. Dead air at the beginning frustrates viewers.

Intro TypeDurationUse
immediate0msDefault. Content appears on first frame.
short200msOnly after explicit audio cue.
standard500msMaximum. Only for dramatic section breaks.

Between-Scene Transitions

Use video-specific durations (shorter than web):

TransitionWeb DurationVideo Duration
Crossfade300ms100ms (3 frames)
Dissolve400ms150ms (5 frames)
Slide400ms200ms (6 frames)

Never use pixel dissolve for standard video transitions. It looks dated.

Typography Sizing

All video text must meet minimum size constraints:

ElementBase SizeMinimum
Title80px48px
Subtitle32px24px
Lower Third Name28px20px
Lower Third Title18px14px
Body24px18px
Caption16px14px

Celebration Effects

IMPORTANT: The celebration recipe requires explicit triggering. It should never auto-trigger.

When to use:

  • Milestone reached
  • Achievement unlocked
  • Task completed
  • Level up

When NOT to use:

  • Scene transitions
  • Background animations
  • Regular content entrances
  • Ambient effects

Performance Checklist

  • ☐ Use will-change for animated properties
  • ☐ Prefer transform and opacity over layout properties
  • ☐ Use contain: layout for isolated animations
  • ☐ Batch DOM reads and writes
  • ☐ Use requestAnimationFrame for JS animations
  • ☐ Test on low-end devices
  • ☐ Provide reduced motion alternatives

Related Skills

  • choice-resolution - Unified parameter resolution pipeline
  • emotion-mapping - Map emotions to recipe parameters
  • component-animations - Component-specific recipes
  • easing - Easing curve selection for recipes
  • duration - Duration selection for recipes
  • platform-adaptation - Platform-specific adjustments
  • code-generation - Generate code from recipes

دانلود ZIP