Token导航 LogoToken导航

Agent Skill · 前端设计

ui-animation(用户界面动画)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

ui-animation 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 4,928。

总安装 774周安装 31GitHub Stars 4下载 250核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/lukasstrickler/ai-dev-atelier --skill ui-animation

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

辅助前端页面、组件、样式和交互逻辑的开发与维护,提升代码质量。可生成或审查 React、Next.js、Vue、Tailwind、CSS 相关代码,定位布局问题。需结合项目现有设计系统、路由和构建方式,避免生成孤立片段。涉及页面改动时应配合本地预览和构建检查确认视觉效果。

ui-animation 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/ui-animation

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/lukasstrickler/ai-dev-atelier --skill ui-anima…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

ui-animation 怎么安装?

在终端执行 npx skills add https://github.com/lukasstrickler/ai-dev-atelier --skill ui-animation。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

ui-animation 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

ui-animation 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

ui-animation 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

ui-animation 用的人多吗?

公开数据是累计安装 774 次,近一周安装 31 次,下载 250 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

ui-animation 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
ui-animation

用户界面动画 · 本页

7744只读MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

UI Animation

Tasteful UI animation with proper timing, accessibility, and performance.

Quick Start

Technique Decision:

  • Simple transition? → CSS/Tailwind (transition-*, animate-*)
  • Enter/exit with unmount? → Motion + AnimatePresence
  • Gesture-driven? → Motion springs
  • Layout changes? → Motion layout prop

Default: Start with Easing Decision Tree → Duration Guidelines → Implement → Add a11y → Verify

Core Principles

  1. Natural Motion: Mimic physics. Avoid linear easing - nothing moves at constant speed.
  2. Purposeful: Every animation must add meaning. If you can't explain its benefit, remove it.
  3. Fast: UI animations under 300ms. Hover effects under 150ms. Over 500ms feels sluggish.
  4. Interruptible: Use springs for gesture-driven animations - they handle interruption gracefully.
  5. Accessible: Always respect prefers-reduced-motion. Non-negotiable.

Workflow

Step 1: Classify Animation Type

TypeExamplesTechnique
Micro-interactionButton press, toggle, checkboxCSS/Tailwind
Enter/ExitModal, toast, dropdownMotion + AnimatePresence
Layout changeAccordion, reorder, expandMotion layout prop
Shared elementTab indicator, card expandMotion layoutId
GestureDrag, swipe, pull-to-refreshMotion springs

Step 2: Choose Timing

  1. Use Easing Decision Tree below to select curve
  2. Use Duration Guidelines to select timing
  3. For gestures, use Spring Animations config

Step 3: Implement

  1. Check references/recipes.md for copy-paste patterns
  2. Apply timing from Step 2
  3. Wrap unmounting elements in AnimatePresence

Use ui_to_artifact when starting from a design screenshot or mockup. Use ui_diff_check to compare expected vs implemented UI.

Step 4: Accessibility (Required)

  1. Check prefers-reduced-motion with useReducedMotion() or motion-safe:
  2. Simplify to opacity-only for reduced motion users
  3. Verify focus timing (move focus AFTER animation starts)

Step 5: Verify

  • Exit animations run (not instant unmount)
  • opacity: 0 elements have pointerEvents: none
  • Focus moves after animation starts, not before
  • Only animating transform and opacity

Easing

Decision Tree

What triggers the animation?
│
├─ User action (click, tap, open)?
│  └─ Use: ease-out (fast start, slow end = responsive)
│
├─ Element moving on-screen (tab switch, reorder)?
│  └─ Use: ease-in-out (accelerate then decelerate)
│
├─ Continuous/looping (spinner, marquee)?
│  └─ Use: linear (constant speed appropriate here)
│
├─ Gesture-based (drag, swipe, pull)?
│  └─ Use: Spring animation (physics-based, interruptible)
│
└─ Hover/focus effect?
   └─ Use: CSS ease, 150ms (subtle, immediate)

Quick Reference

PurposeCSSTailwindDuration
Modal/drawer entercubic-bezier(0.32, 0.72, 0, 1)ease-out duration-200200ms
Modal/drawer exitcubic-bezier(0.32, 0.72, 0, 1)ease-out duration-150150ms
On-screen movementcubic-bezier(0.4, 0, 0.2, 1)ease-in-out duration-200200-300ms
Hover effecteaseease duration-150150ms
Button press—active:scale-[0.97]instant

Pro Curves

NameValueUse Case
Vaul (buttery)cubic-bezier(0.32, 0.72, 0, 1)Sheets, drawers, modals
Emphasizedcubic-bezier(0.2, 0, 0, 1)Material Design 3
Snappycubic-bezier(0.25, 1, 0.5, 1)Fast UI transitions

Avoid: Built-in ease-in—starts slow, feels sluggish.

Duration Guidelines

TypeDurationNotes
Micro-feedback100-150msButton press, toggle, checkbox
Small transition150-250msTooltip, icon morph
Medium transition200-300msModal, popover, dropdown
Large transition300-400msPage transition, complex layout
Maximum<500msExceptions: onboarding, data viz

Key Rules:

  • Exit faster than enter: 200ms enter → 150ms exit
  • Hover = fast: Under 150ms
  • High-frequency = instant: Keyboard nav, scrolling—<100ms or none

Spring Animations

Duration-based (Recommended)

Easier to compose with other timed animations. Use visualDuration (time to visually reach target) and bounce (0 = no bounce, 1 = very bouncy).

FeelConfigUse Case
Snappy{duration: 0.3, bounce: 0.15}Tabs, buttons, quick feedback
Standard{duration: 0.4, bounce: 0.2}Modals, menus, general UI
Gentle{duration: 0.5, bounce: 0.25}Smooth, human-like flow

Physics-based (Legacy/Advanced)

Use when integrating with physics libraries or when precise control over spring dynamics is needed.

FeelConfigUse Case
Snappy{stiffness: 400, damping: 30}High-frequency interactions
Standard{stiffness: 300, damping: 20}Framer Handshake convention
Gentle{stiffness: 120, damping: 14}react-motion preset
Gotcha: stiffness/damping/mass overrides duration/bounce. Pick one approach—don't mix.

Layout Animations

The layout Prop

Add layout to animate position/size changes automatically. Use layout="position" for text (prevents distortion).

Prop ValueEffectUse Case
layout={true}Animates position AND sizeDefault for flexible elements
layout="position"Animates only translationText/icons that shouldn't stretch
layout="size"Animates only dimensionsFixed-position expanding panels

Shared Element Transitions (layoutId)

Elements with matching layoutId animate between each other when entering/exiting.

Critical Trap: Duplicate layoutId values cause elements to teleport across the page. Use unique IDs per context or wrap in <LayoutGroup id="...">.

Layout Gotchas

  • Text distortion: Apply layout="position" to text elements
  • Border radius: Can warp during scale—Motion auto-corrects, but test it
  • SVG elements: layout doesn't work on <path>—use manual morphing

Gesture Gotchas

ProblemSolution
Touch scroll conflictsdragPropagation={false}
Element snaps backCheck dragConstraints + dragElastic
Momentum feels wrongdragMomentum={false} for precise UIs
One-direction onlydragElastic={{top: 0, bottom: 0.5}}

Swipe dismiss: Check BOTH distance AND velocity—users expect flicks to work.

Accessibility

prefers-reduced-motion (REQUIRED)

import { useReducedMotion } from "motion/react"

const shouldReduce = useReducedMotion()
const variants = shouldReduce
  ? { opacity: 1 }                    // Fade only
  : { opacity: 1, scale: 1, y: 0 }    // Full animation

Tailwind: motion-safe:animate-pulse / motion-reduce:transition-none

Best practice: Don't disable—simplify. Remove spatial movement, keep opacity.

Focus Management

  • Move focus AFTER animation starts: requestAnimationFrame(() => ref.focus())
  • Restore focus to trigger on close
  • Don't animate inside aria-live regions

Touch Targets

StandardSizeTailwindPhysical
Material Design48×48 dpmin-h-12 min-w-12~9mm (recommended)
Apple HIG44×44 ptmin-h-11 min-w-11~7mm
WCAG 2.2 (AA)24×24 pxmin-h-6 min-w-6~5mm (minimum)

Why? Average adult finger pad is ~9mm. Targets below 7mm cause "fat finger" errors. Use Material's 48dp for cross-platform; Apple's 44pt is iOS-specific minimum.

Performance

Golden Rules

  1. Only animate transform and opacity—GPU-accelerated
  2. Never animate: width, height, top, left, margin, padding
  3. will-change sparingly—only during animation, remove after
  4. Blur thresholds:

- ≤10px: Safe for animation - 11-20px: May cause jank on mobile/4K—test thoroughly - 20px: Avoid for real-time effects; use pre-blurred images instead

  1. Prefer CSS over JS for simple transitions

Key Traps

  • Height animation: Use layout prop, not animate={{height}}
  • Invisible but clickable: opacity: 0 still receives clicks—add pointerEvents: "none"
  • will-change everywhere: Causes layer explosion, mobile crashes

See references/recipes.md for detailed examples.

Examples

Copy-paste patterns organized by category in references/recipes.md:

  • Common UI Patterns: Button press, modal enter/exit, error shake, staggered lists, accordion
  • Touch & Interaction: Accessible touch targets, hover on touch devices, instant tooltips
  • Layout Animations: layout prop, layoutId shared elements, collision fixes
  • Radix UI Integration: forceMount pattern, asChild, origin-aware popovers
  • Accessibility: Focus timing, focus restoration, reduced motion variants
  • Performance: Height animation (use layout), invisible-but-clickable fix, will-change
  • Exit Patterns: popLayout with forwardRef, SSR hydration (initial={false})
  • Gestures: Swipe dismiss with velocity check, elastic drag boundaries

AnimatePresence

ModeBehaviorUse Case
sync (default)Simultaneous enter/exitCrossfades, overlays
waitExit completes before enterPage transitions, tabs
popLayoutExiting elements leave flowList removals (with layout)

Exit Animation Trap

Exit animations require AnimatePresence—without it, unmount is instant:

// ❌ Exit never runs
{isOpen && <motion.div exit={{ opacity: 0 }}>...</motion.div>}

// ✅ Wrap in AnimatePresence
<AnimatePresence>
  {isOpen && <motion.div exit={{ opacity: 0 }}>...</motion.div>}
</AnimatePresence>

SSR: Use <AnimatePresence initial={false}> to prevent animation on page load.

Anti-patterns

Don'tDo InsteadWhy
scale(0) startscale(0.9) or higherAvoids "popping" effect
linear for UIease-out or springsLinear feels robotic
Animations >500msKeep under 300msFeels sluggish
Same tooltip delayFirst: 400ms, subsequent: 0msUser mental model
Skip reduced-motionAlways motion-safe:Accessibility
Animate layout propsUse transform: scale()Performance
Excessive bouncebounce: 0-0.2Unprofessional

tailwindcss-animate

Tailwind v4: Define keyframes via @theme in CSS, not config.
CategoryClasses
Enteranimate-in fade-in zoom-in-95 slide-in-from-top
Exitanimate-out fade-out zoom-out-95 slide-out-to-top
Timingdelay-150 duration-500
Fill Modefill-mode-forwards fill-mode-backwards

Integration with Other Skills

WhenSkillWhy
After implementingcode-qualityEnsure code passes checks
Reusable patternsdocs-writeDocument component API
Before committinggit-commitUse feat(ui): or style:
Integration issuessearchLook up latest patterns

Output

  • Artifacts: Code changes only (no .ada/ outputs)
  • Modifications: Component animations, CSS/Tailwind styles, Motion configs
  • Type: Workflow skill (guidance only, no scripts)

References

Internal

External

平台分布

Antigravity

24.8%
按下载量换算62

Gemini CLI

23.57%
按下载量换算59

github-copilot

17.57%
按下载量换算44

Claude Code

12.61%
按下载量换算32

openclaw

8.14%
按下载量换算20

kilo

3.52%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills