Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

ui-animation用户界面动画

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

96,960

周安装

4,034

GitHub Stars

33

下载量

31,680
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ui-animation(用户界面动画)
来源仓库:https://github.com/mblode/agent-skills
仓库路径:skills/ui-animation
安装命令:
npx skills add https://github.com/mblode/agent-skills --skill ui-animation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mblode/agent-skills --skill ui-animation

简介

使用可访问性和性能最佳实践来设计、实现和审查 UI 动画。

  • 涵盖 CSS 过渡、关键帧、Framer Motion 和弹簧动画,并提供有关缓动曲线、计时(标准 200–300ms)和基于变换的运动的指导
  • 强制减少运动偏好
  • 支持、触摸设备悬停处理和键盘交互规则,以确保可访问的运动
  • 提供要避免的反模式:过渡:全部
  • 、布局属性动画、永久会改变,以及无动机的入口动画
  • 包括性能优化规则:仅动画变换
  • 和不透明度,暂停离屏循环,并切换 will-change
  • 有条件地

SKILL.md

UI Animation

Reference files

FileRead when
references/decision-framework.mdDefault: animation decisions, easing, and duration
references/spring-animations.mdUsing spring physics, framer-motion useSpring, configuring spring params
references/component-patterns.mdBuilding buttons, popovers, tooltips, drawers, modals, toasts with animation
references/clip-path-techniques.mdUsing clip-path for reveals, tabs, hold-to-delete, comparison sliders
references/gesture-drag.mdImplementing drag, swipe-to-dismiss, momentum, pointer capture
references/performance-deep-dive.mdDebugging jank, CSS vs JS, WAAPI, CSS variables trap, Framer Motion caveats
references/review-format.mdReviewing animation code — Before/After/Why table and issue checklist
references/contextual-animations.mdImplementing contextual icon swaps, word-level stagger entrances, or fixed-offset exit animations

Core rules

  • Animate for feedback, orientation, continuity, or deliberate delight.
  • Never animate keyboard-initiated actions (shortcuts, arrow navigation, tab/focus).
  • Prefer CSS transitions for interruptible UI; use keyframes only for predetermined sequences.
  • CSS transitions > WAAPI > CSS keyframes > JS (requestAnimationFrame).
  • Make animations interruptible and input-driven.
  • Asymmetric timing: enter can be slightly slower; exit should be fast.
  • Use @starting-style for DOM entry animations; fall back to data-mounted.
  • A small filter: blur(2px) can hide rough crossfades.

Motion design principles

  • Continuity over teleportation. Elements visible in both states transition in place. Never duplicate a persistent element or hard-cut between views that share components.
  • Directional motion matches position. Tab and carousel transitions animate in the direction matching spatial layout (left-to-right for forward, right-to-left for back).
  • Emerge from the trigger. Overlays, trays, and panels animate outward from the element that opened them. Generic centre-screen entrances break spatial orientation.
  • Consistent polish everywhere. Under-animated areas make the entire product feel unpolished. Motion quality must be uniform across all surfaces.
  • Delight scales inversely with frequency. Rarer interactions have more room for personality and surprise. High-frequency actions must be invisible.
  • Motion enhances perceived speed. Smooth transitions between states feel faster than hard cuts, even at identical load times.

What to animate

  • Movement: transform and opacity only.
  • State feedback: color, background-color, and opacity are acceptable.
  • Never animate layout properties (width, height, top, left); never use transition: all.
  • Avoid filter animation for core interactions; keep blur <= 20px if unavoidable.
  • SVG: apply transforms on a <g> wrapper with transform-box: fill-box; transform-origin: center.
  • Disable transitions during theme switches ([data-theme-switching] * {transition: none!important}).

Easing defaults

ElementDurationEasing
Button press feedback100–160mscubic-bezier(0.22, 1, 0.36, 1)
Tooltips, small popovers125–200msease-out or enter curve
Dropdowns, selects150–250mscubic-bezier(0.22, 1, 0.36, 1)
Modals, drawers200–350mscubic-bezier(0.22, 1, 0.36, 1)
Move/slide on screen200–300mscubic-bezier(0.25, 1, 0.5, 1)
Simple hover (colour/opacity)200msease
Illustrative/marketingUp to 1000msSpring or custom

Named curves

  • Enter: cubic-bezier(0.22, 1, 0.36, 1) — entrances and transform-based hover
  • Move: cubic-bezier(0.25, 1, 0.5, 1) — slides, drawers, panels
  • Drawer (iOS-like): cubic-bezier(0.32, 0.72, 0, 1)

Avoid ease-in for UI. Prefer custom curves from easing.dev.

Spatial and sequencing

  • Set transform-origin at the trigger point for popovers; keep center for modals.
  • For dialogs/menus, start around scale(0.85–0.9). Never scale(0).
  • Stagger reveals at 30–50ms per item; total stagger under 300ms.

Accessibility

  • Gate hover animations behind @media (hover: hover) and (pointer: fine) to avoid false positives on touch.
  • During direct manipulation, keep the element locked to the pointer. Add easing only after release.

Performance

  • Only animate transform and opacity — these skip layout and paint.
  • Pause looping animations off-screen with IntersectionObserver.
  • Toggle will-change only during heavy motion and only for transform/opacity — remove after.
  • Do not animate drag gestures using CSS variables (triggers recalc on all children).
  • Motion x/y values are the normal choice for axis-based movement and drag. Use full transform strings when you need one transform owner for combined transforms or interop.
  • See references/performance-deep-dive.md for WAAPI, compositing layers, and CSS vs JS comparison.

Anti-patterns

  • transition: all — triggers layout recalc and animates unintended properties.
  • Animating layout properties (width, height, top, left) for interactive feedback.
  • Using ease-in for UI entrances — feels sluggish.
  • Animating from scale(0) — nothing in the real world appears from nothing. Use scale(0.85–0.95).
  • Animating on mount without user trigger — unexpected motion is disorienting.
  • Permanent will-change — toggle it only during heavy motion.
  • CSS variables for drag gesture animation — repaints every frame.
  • Symmetric enter/exit timing — exit should be faster (user expects instant response).
  • Hard stops on drag boundaries — use friction/damping instead.
  • Mixing Motion x/y props with a handwritten transform string on the same element.
  • Keyframes on rapidly-triggered elements — use CSS transitions for interruptibility.
  • Static cuts between related views — if views share elements, hard cuts lose spatial context. Transition shared elements in place.
  • Duplicating persistent elements across states — animate the same element from its current position to its next, rather than hiding one and showing another.
  • Generic centre-screen entrance for contextual content — overlays and trays should emerge from their trigger, not fade in from nowhere.

Workflow

Copy and track this checklist:

Animation progress:
- [ ] Step 1: Decide whether the interaction should animate
- [ ] Step 2: Choose purpose, easing, and duration
- [ ] Step 3: Pick the implementation style
- [ ] Step 4: Load the relevant component or technique reference
- [ ] Step 5: Validate timing, interruption, and device behavior
  1. Answer the four questions from references/decision-framework.md: should it animate? What purpose? What easing? What speed?
  2. Pick duration from the easing defaults table above.
  3. Choose implementation: CSS transition > WAAPI > spring > keyframe > JS.
  4. Load the relevant reference for your component type or technique.
  5. When reviewing, use the Before/After/Why table format from references/review-format.md.

Validation

  • 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.
  • Retoggle components quickly to confirm transitions retarget cleanly instead of restarting from zero.
  • Slow animations to 0.1x in DevTools to catch timing issues invisible at full speed.
  • Record and play back frame-by-frame for coordinated property timing.
  • Test touch interactions on real devices (not just simulators).

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.4%
按下载量换算10,581

Claude

31.18%
按下载量换算9,878

Cursor

17.38%
按下载量换算5,506

Gemini CLI

9.6%
按下载量换算3,041

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills