Emilkowal Animations

作者 pproencacf93c57cac89無授權條款215 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫7 週前更新

Emil Kowalski's animation best practices for web interfaces. Use when writing, reviewing, or implementing animations in React, CSS, or Framer Motion. Triggers on tasks involving transitions, easing, gestures, toasts, drawers, or motion.

AI 產生的概覽

網頁動畫最佳實務參考指南,涵蓋緩動、時長、變換、手勢、無障礙與 Tailwind v4。

功能
此技能提供一套針對網頁介面的 58 條動畫規則,依優先順序分為八個類別,包括緩動選擇、時長與持續時間、屬性選擇、變換技巧、互動模式、策略性動畫、無障礙與細節打磨,以及 Tailwind v4 工具類別。每條規則各自存放在獨立的參考檔案中,文件另提供速查清單、關鍵數值表,以及依元素類型區分的時長建議。它產出的是指引與建議,而非程式碼或檔案。
適用情境
在 React、CSS 或 Framer Motion 介面中新增、審查或實作動畫時使用。它適合用於選擇緩動曲線與時長、建構手勢互動、提示訊息或抽屜元件、最佳化動畫效能,以及處理減少動態效果的無障礙需求。需要以 Tailwind CSS v4 工具類別表達這些原則時同樣適用。
執行需求
不需要指令碼或執行環境相依項目;這是僅含說明的技能,由 Markdown 參考檔案組成。使用時不需要憑證或網路存取。

Emil Kowalski Animation Best Practices

Comprehensive animation guide for web interfaces based on Emil Kowalski's teachings, open-source libraries (Sonner, Vaul), and his animations.dev course. Contains 58 rules across 8 categories, prioritized by impact.

When to Apply

Reference these guidelines when:

  • Adding animations to React components
  • Choosing easing curves or timing values
  • Implementing gesture-based interactions (swipe, drag)
  • Building toast notifications or drawer components
  • Optimizing animation performance
  • Ensuring animation accessibility
  • Expressing any of the above with Tailwind CSS v4 utilities (see the tw- category)

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Easing SelectionCRITICALease-
2Timing & DurationCRITICALtiming-
3Property SelectionHIGHprops-
4Transform TechniquesHIGHtransform-
5Interaction PatternsMEDIUM-HIGHinteract-
6Strategic AnimationMEDIUMstrategy-
7Accessibility & PolishMEDIUMpolish-
8Tailwind v4 UtilitiesMEDIUMtw-

Quick Reference

1. Easing Selection (CRITICAL)

  • ease-out-default [blocked] - Use ease-out as your default easing
  • ease-custom-curves [blocked] - Use custom cubic-bezier over built-in CSS
  • ease-in-out-onscreen [blocked] - Use ease-in-out for on-screen movement
  • ease-spring-natural [blocked] - Use spring animations for natural motion
  • ease-spring-config [blocked] - Configure springs with duration and bounce
  • ease-ios-drawer [blocked] - Use iOS-style easing for drawer components
  • ease-context-matters [blocked] - Match easing to animation context

2. Timing & Duration (CRITICAL)

  • timing-300ms-max [blocked] - Keep UI animations under 300ms
  • timing-faster-better [blocked] - Faster animations improve perceived performance
  • timing-asymmetric [blocked] - Use asymmetric timing for press and release
  • timing-tooltip-delay [blocked] - Delay initial tooltips, instant subsequent ones
  • timing-drawer-500ms [blocked] - Use 500ms duration for drawer animations

3. Property Selection (HIGH)

  • props-transform-opacity [blocked] - Animate only transform and opacity
  • props-hardware-accelerated [blocked] - Use hardware-accelerated animations when main thread is busy
  • props-will-change [blocked] - Use will-change to prevent 1px shift
  • props-avoid-css-variables [blocked] - Avoid CSS variables for drag animations
  • props-clip-path-performant [blocked] - Use clip-path for layout-free reveals

4. Transform Techniques (HIGH)

  • transform-scale-097 [blocked] - Scale buttons to 0.97 on press
  • transform-never-scale-zero [blocked] - Never animate from scale(0)
  • transform-percentage-translate [blocked] - Use percentage values for translateY
  • transform-origin-aware [blocked] - Make animations origin-aware
  • transform-scale-children [blocked] - Scale transforms affect children
  • transform-3d-preserve [blocked] - Use preserve-3d for 3D transform effects
  • transform-starting-style [blocked] - Animate enter states with @starting-style

5. Interaction Patterns (MEDIUM-HIGH)

  • interact-interruptible [blocked] - Make animations interruptible
  • interact-momentum-dismiss [blocked] - Use momentum-based dismissal
  • interact-damping [blocked] - Damp drag at boundaries
  • interact-scroll-drag-conflict [blocked] - Resolve scroll and drag conflicts
  • interact-snap-points [blocked] - Implement velocity-aware snap points
  • interact-friction-upward [blocked] - Allow upward drag with friction
  • interact-pointer-capture [blocked] - Use pointer capture for drag operations
  • interact-multitouch [blocked] - Ignore extra touch points during drag
  • interact-touch-hover [blocked] - Gate hover animations behind a pointer media query

6. Strategic Animation (MEDIUM)

  • strategy-keyboard-no-animate [blocked] - Never animate keyboard-initiated actions
  • strategy-frequency-matters [blocked] - Consider interaction frequency before animating
  • strategy-purpose-required [blocked] - Every animation must have a purpose
  • strategy-feedback-immediate [blocked] - Provide immediate feedback on all actions
  • strategy-marketing-exception [blocked] - Marketing sites are the exception
  • strategy-cohesion [blocked] - Match motion to the component's personality
  • strategy-review-fresh-eyes [blocked] - Review animations in slow motion and the next day

7. Accessibility & Polish (MEDIUM)

  • polish-reduced-motion [blocked] - Respect prefers-reduced-motion
  • polish-opacity-fallback [blocked] - Use opacity as reduced motion fallback
  • polish-framer-hook [blocked] - Use useReducedMotion hook in Framer Motion
  • polish-dont-remove-all [blocked] - Keep gentle animation for reduced motion
  • polish-blur-bridge [blocked] - Use blur to bridge animation states
  • polish-clip-path-tabs [blocked] - Use clip-path for tab transitions
  • polish-toast-stacking [blocked] - Implement toast stacking with scale and offset
  • polish-scroll-reveal [blocked] - Trigger scroll animations at appropriate threshold
  • polish-hover-gap-fill [blocked] - Fill gaps between hoverable elements
  • polish-stagger-children [blocked] - Stagger child animations for orchestration

8. Tailwind v4 Utilities (MEDIUM)

Express the principles above with proper Tailwind CSS v4 utilities. Applies only to Tailwind v4 projects; the raw-CSS and Framer Motion rules above remain the source of truth.

  • tw-ease-duration-defaults [blocked] - Set ease-out and a sub-300ms duration explicitly
  • tw-custom-easing-theme [blocked] - Register custom easing curves as @theme tokens
  • tw-press-scale [blocked] - Use active:scale-[0.97] for button press feedback
  • tw-asymmetric-timing [blocked] - Split press and release timing with active:duration
  • tw-starting-enter [blocked] - Animate enter states with the starting: variant
  • tw-reduced-motion [blocked] - Gate movement behind motion-safe / motion-reduce
  • tw-origin-aware [blocked] - Set transform-origin with origin-* utilities
  • tw-will-change [blocked] - Scope will-change-transform to the active gesture

Key Values Reference

ValueUsage
cubic-bezier(0.23, 1, 0.32, 1)Strong ease-out for UI interactions
cubic-bezier(0.77, 0, 0.175, 1)Strong ease-in-out for on-screen movement
cubic-bezier(0.32, 0.72, 0, 1)iOS-style drawer/sheet animation
scale(0.97)Button press feedback
scale(0.95)Minimum enter scale (never scale(0))
200ms ease-outStandard UI transition
300msMaximum duration for UI animations
500msDrawer animation duration
0.11 px/msVelocity threshold for momentum dismiss
100pxScroll-reveal viewport threshold
14pxToast stack offset

Duration by Element

Pick duration by how often the element is seen and how much it moves. Keep UI animations under 300ms.

ElementDuration
Button press feedback100–160ms
Tooltips, small popovers125–200ms
Dropdowns, selects150–250ms
Modals, drawers200–500ms
Marketing / explanatoryCan be longer

Reference Files

FileDescription
references/_sections.md [blocked]Category definitions and ordering
assets/templates/_template.md [blocked]Template for new rules
metadata.json [blocked]Version and reference information

來源與署名

來源:pproenca/dot-skills位於skills/.experimental/emilkowal-animations提交cf93c57

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架