platform-adaptation

انیمیشن‌های رابط کاربری را برای پلتفرم‌ها، دستگاه‌ها و زبان‌های RTL سازگار کنید.

این Skill الگوهای موشن را برای iOS، Android، وب، دسکتاپ و دستگاه‌های مختلف تطبیق می‌دهد و تفاوت‌های رایج در ترنزیشن، مودال، ناوبری و تعاملات را در نظر می‌گیرد.

همچنین انیمیشن‌های افقی را برای رابط‌های RTL مانند فارسی و عربی به‌درستی آینه می‌کند، بدون اینکه حرکت عمودی، چرخش یا مقیاس را بی‌دلیل تغییر دهد. نتیجه، تجربه‌ای طبیعی‌تر، پایدارتر و مناسب‌تر برای قابلیت‌های سخت‌افزاری مختلف است.

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

  • الگوهای موشن سازگار با conventions پلتفرم‌های iOS، Android و وب
  • منطق آینه‌سازی انیمیشن‌های افقی برای رابط‌های RTL
  • راهکار تشخیص قابلیت دستگاه و کاهش کیفیت انیمیشن در دستگاه‌های ضعیف
  • نمونه‌های CSS و JavaScript برای پیاده‌سازی جهت پویا
  • فهرست خطاهای رایج در تطبیق پلتفرم و internationalization

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

  • تیم‌هایی که یک رابط کاربری را برای وب، موبایل و دسکتاپ توسعه می‌دهند
  • محصولات چندزبانه با پشتیبانی از فارسی، عربی، عبری یا اردو
  • طراحان و توسعه‌دهندگانی که می‌خواهند موشن‌ها با convention هر پلتفرم هماهنگ باشند
  • اپلیکیشن‌هایی که باید روی دستگاه‌های ضعیف نیز روان اجرا شوند

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

  • ساخت انیمیشن‌های کاملاً تزئینی که به تفاوت پلتفرم یا جهت متن وابسته نیستند
  • پروژه‌هایی که فقط یک پلتفرم و یک جهت نوشتار ثابت دارند
  • تولید ویدیو یا موشن‌گرافیک مستقل از رابط کاربری

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

Platform Adaptation

Motion patterns that adapt to platform conventions, device capabilities, and internationalization requirements.

Platform-Specific Conventions

iOS / Apple

PatterniOS ConventionImplementation
Page transitionPush from righttranslateX: 100% to 0
Back navigationSlide to righttranslateX: 0 to 100%
ModalSlide from bottomtranslateY: 100% to 0
Action sheetSlide from bottomSpring physics
Pull-to-refreshRubber-band effectElastic overshoot

Android / Material

PatternAndroid ConventionImplementation
Page transitionShared axisFade + scale
Back navigationFade outFade through
ModalSlide from bottomContainer transform
FABScale from centeremphasized-decelerate
SnackbarSlide from bottomQuick ease-out

Web / Desktop

PatternDesktop ConventionImplementation
Hover statesImmediate feedback100-150ms transitions
ModalsFade + scaleCenter of viewport
TooltipsFade in with delay200ms delay, 100ms transition
DropdownsFade + slide downOrigin from trigger

RTL (Right-to-Left) Adaptation

For languages like Arabic, Hebrew, Farsi, and Urdu, horizontal animations must be mirrored.

What to Mirror

Animation TypeLTRRTL
Slide infrom leftfrom right
Slide outto rightto left
Page pushfrom rightfrom left
Arrow motionright arrowleft arrow
Progress barleft to rightright to left
Carousel swipeleft = prevleft = next

What NOT to Mirror

Animation TypeBehaviorRationale
Vertical motionSameUp/down is universal
RotationSameClockwise is universal
ScaleSameCenter-out is universal
OpacitySameFade is directionless
Z-depthSameToward/away is universal

CSS Implementation

/* Base animation (LTR) */
.slide-in {
  animation: slide-in-ltr 300ms ease-out;
}

@keyframes slide-in-ltr {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* RTL override */
[dir="rtl"] .slide-in {
  animation-name: slide-in-rtl;
}

@keyframes slide-in-rtl {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

JavaScript Direction Helper

function getDirectionMultiplier() {
  return document.dir === 'rtl' ? -1 : 1;
}

function slideIn(element, options = {}) {
  const dir = getDirectionMultiplier();
  return gsap.from(element, {
    x: (options.distance || 100) * -dir,
    opacity: 0,
    duration: 0.3,
    ease: 'power2.out'
  });
}

Device Capability Adaptation

const capabilities = {
  gpu: detectGPU(),
  memory: navigator.deviceMemory || 4,
  connection: navigator.connection?.effectiveType || '4g',
  cores: navigator.hardwareConcurrency || 4
};

function getAnimationQuality() {
  if (capabilities.memory < 2) return 'minimal';
  if (capabilities.memory < 4) return 'reduced';
  if (capabilities.gpu === 'low-end') return 'standard';
  return 'full';
}

Common Mistakes

  1. Forgetting RTL - Test all horizontal animations in RTL mode
  2. Mirroring everything - Vertical and scale should NOT mirror
  3. Hardcoded directions - Use logical properties and direction multipliers
  4. Platform mismatch - iOS users expect iOS conventions
  5. Ignoring capabilities - Low-end devices need simpler animations

Related Skills

  • transitions/ - Page transition patterns
  • accessibility/ - Reduced motion for all platforms
  • testing-patterns/ - RTL testing strategies
  • tools/ - Platform-specific tool usage

See references/ for complete Framer Motion and Remotion RTL implementations.

دانلود ZIP