AgentSkillsCN

emilkowal-animations

埃米尔·科瓦尔斯基针对 Web 界面所总结的动画最佳实践。适用于在 React、CSS 或 Framer Motion 中编写、审查或实现动画时使用。当涉及过渡、缓动、手势、Toast 提示、抽屉式导航或各类动态效果的任务时,均可触发此技能。

SKILL.md
--- frontmatter
name: emilkowal-animations
description: 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.

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

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

Quick Reference

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)

Key Values Reference

ValueUsage
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

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information