U

ui-animation

by @mblodev
4.4(33)

创建、审查和调试UI动效与动画实现,提升用户体验。,AI Agent Skill,提升工作效率和自动化能力

ui-animationmotion-designframer-motioncss-animationsmicrointeractionsGitHub
安装方式
npx skills add mblode/agent-skills --skill ui-animation
compare_arrows

Before / After 效果对比

1
使用前

UI动画实现复杂,调试困难,效果不佳。开发者常因动画细节处理不当,导致用户体验下降,项目视觉效果大打折扣。

使用后

此技能帮助创建、审查和调试UI动画实现。确保动画流畅自然,提升用户交互体验,使产品界面更具吸引力。

SKILL.md

UI Animation

Core rules

  • Animate to clarify cause/effect or add deliberate delight.
  • Keep interactions fast (200-300ms; up to 1s only for illustrative motion).
  • Never animate keyboard interactions (arrow-key navigation, shortcut responses, tab/focus).
  • Prefer CSS; use WAAPI or JS only when needed.
  • Make animations interruptible and input-driven.
  • Honor prefers-reduced-motion (reduce or disable).

What to animate

  • For movement and spatial change, animate only transform and opacity.
  • For simple state feedback, color, background-color, and opacity transitions are acceptable.
  • Never animate layout properties; never use transition: all.
  • Avoid filter animation for core interactions; if unavoidable, keep blur <= 20px.
  • SVG: apply transforms on a <g> wrapper with transform-box: fill-box; transform-origin: center.
  • Disable transitions during theme switches.

Spatial and sequencing

  • Set transform-origin at the trigger point.
  • For dialogs/menus, start around scale(0.85-0.9); avoid scale(0).
  • Stagger reveals <= 50ms.

Easing defaults

  • Enter and transform-based hover: cubic-bezier(0.22, 1, 0.36, 1).
  • Move: cubic-bezier(0.25, 1, 0.5, 1).
  • Simple hover colour/background/opacity: 200ms ease.
  • Avoid ease-in for UI (feels slow).

Accessibility

  • If transform is used, disable it in prefers-reduced-motion.
  • Disable hover transitions on touch devices via @media (hover: hover) and (pointer: fine).

Performance

  • Pause looping animations off-screen.
  • Toggle will-change only during heavy motion and only for transform/opacity.
  • Prefer transform over positional props in animation libraries.
  • Do not animate drag gestures using CSS variables.

Reference

Workflow

  1. Start with the core rules, then pick a reference snippet from examples.md.
  2. Keep motion functional; honor prefers-reduced-motion.
  3. When reviewing, cite file paths and line numbers and propose concrete fixes.
  4. Validate:
    • Test with prefers-reduced-motion: reduce enabled — animations must degrade gracefully.
    • Verify no layout property animations (width, height, top, left).
    • Check that looping animations pause off-screen.
    • Confirm will-change is toggled only during animation, not permanently set.

用户评价 (0)

发表评价

效果
易用性
文档
兼容性

暂无评价

统计数据

安装量4.8K
评分4.4 / 5.0
版本
更新日期2026年5月23日
对比案例1 组

用户评分

4.4(33)
5
27%
4
48%
3
21%
2
3%
1
0%

为此 Skill 评分

0.0

兼容平台

🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI

时间线

创建2026年3月16日
最后更新2026年5月23日