emilkowal-animations
Original:🇺🇸 English
Translated
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.
2installs
Sourcepproenca/dot-skills
Added on
NPX Install
npx skill4agent add pproenca/dot-skills emilkowal-animationsTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →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 43 rules across 7 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
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Easing Selection | CRITICAL | |
| 2 | Timing & Duration | CRITICAL | |
| 3 | Property Selection | HIGH | |
| 4 | Transform Techniques | HIGH | |
| 5 | Interaction Patterns | MEDIUM-HIGH | |
| 6 | Strategic Animation | MEDIUM | |
| 7 | Accessibility & Polish | MEDIUM | |
Quick Reference
1. Easing Selection (CRITICAL)
- - Use ease-out as your default easing
ease-out-default - - Use custom cubic-bezier over built-in CSS
ease-custom-curves - - Use ease-in-out for on-screen movement
ease-in-out-onscreen - - Use spring animations for natural motion
ease-spring-natural - - Use iOS-style easing for drawer components
ease-ios-drawer - - Match easing to animation context
ease-context-matters
2. Timing & Duration (CRITICAL)
- - Keep UI animations under 300ms
timing-300ms-max - - Faster animations improve perceived performance
timing-faster-better - - Use asymmetric timing for press and release
timing-asymmetric - - Delay initial tooltips, instant subsequent ones
timing-tooltip-delay - - Use 500ms duration for drawer animations
timing-drawer-500ms
3. Property Selection (HIGH)
- - Animate only transform and opacity
props-transform-opacity - - Use hardware-accelerated animations when main thread is busy
props-hardware-accelerated - - Use will-change to prevent 1px shift
props-will-change - - Avoid CSS variables for drag animations
props-avoid-css-variables - - Use clip-path for layout-free reveals
props-clip-path-performant
4. Transform Techniques (HIGH)
- - Scale buttons to 0.97 on press
transform-scale-097 - - Never animate from scale(0)
transform-never-scale-zero - - Use percentage values for translateY
transform-percentage-translate - - Make animations origin-aware
transform-origin-aware - - Scale transforms affect children
transform-scale-children - - Use preserve-3d for 3D transform effects
transform-3d-preserve
5. Interaction Patterns (MEDIUM-HIGH)
- - Make animations interruptible
interact-interruptible - - Use momentum-based dismissal
interact-momentum-dismiss - - Damp drag at boundaries
interact-damping - - Resolve scroll and drag conflicts
interact-scroll-drag-conflict - - Implement velocity-aware snap points
interact-snap-points - - Allow upward drag with friction
interact-friction-upward - - Use pointer capture for drag operations
interact-pointer-capture
6. Strategic Animation (MEDIUM)
- - Never animate keyboard-initiated actions
strategy-keyboard-no-animate - - Consider interaction frequency before animating
strategy-frequency-matters - - Every animation must have a purpose
strategy-purpose-required - - Provide immediate feedback on all actions
strategy-feedback-immediate - - Marketing sites are the exception
strategy-marketing-exception
7. Accessibility & Polish (MEDIUM)
- - Respect prefers-reduced-motion
polish-reduced-motion - - Use opacity as reduced motion fallback
polish-opacity-fallback - - Use useReducedMotion hook in Framer Motion
polish-framer-hook - - Don't remove all animation for reduced motion
polish-dont-remove-all - - Use blur to bridge animation states
polish-blur-bridge - - Use clip-path for tab transitions
polish-clip-path-tabs - - Implement toast stacking with scale and offset
polish-toast-stacking - - Trigger scroll animations at appropriate threshold
polish-scroll-reveal - - Fill gaps between hoverable elements
polish-hover-gap-fill - - Stagger child animations for orchestration
polish-stagger-children
Key Values Reference
| Value | Usage |
|---|---|
| iOS-style drawer/sheet animation |
| Button press feedback |
| Minimum enter scale (never scale(0)) |
| Standard UI transition |
| Maximum duration for UI animations |
| Drawer animation duration |
| Velocity threshold for momentum dismiss |
| Scroll-reveal viewport threshold |
| Toast stack offset |
Reference Files
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |