Ui Animation Engineering 标志

Ui Animation Engineering

社区
alpham8
ui-animation-engineering

用于制定达到生产级水准的 UI 动画方案,涵盖时长、缓动、弹簧效果、transform-origin、可中断性、交错模式和感知性能。适用于评审动画、构建微交互,或 UI“感觉迟钝/不对劲”的情况。以下情形会触发:动画评审、动效设计、下拉菜单/模态框/Toast 动画、“感觉很慢”、“animation wirkt falsch”、微交互、悬停/激活状态。

Add to TypingMind

概览

发布者alpham8
代码仓库agentic-webdev
技能名称ui-animation-engineering
星标数
4
复刻数
0
附带文件
仅含指令
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 alpham8 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Ui Animation Engineering AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/alpham8/agentic-webdev/tree/master/skills/ui-animation-engineering
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/alpham8/agentic-webdev.git /tmp/agentic-webdev
mkdir -p .claude/skills
cp -r /tmp/agentic-webdev/skills/ui-animation-engineering .claude/skills/ui-animation-engineering
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Ui Animation Engineering,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Ui Animation Engineering。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Ui Animation Engineering 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

UI Animation Engineering

Based on Emil Kowalski's design engineering philosophy. Every animation decision must be intentional — unseen details compound into interfaces people love without knowing why.

Core Philosophy

Taste is trained, not innate

Good animation is not personal preference. It is a trained instinct: the ability to recognize what elevates an interaction. Study why the best interfaces feel the way they do. Reverse engineer animations. Inspect interactions. Be curious.

Unseen details compound

Most details users never consciously notice. That is the point. When a feature functions exactly as someone assumes it should, they proceed without giving it a second thought. That is the goal.

Beauty is leverage

People select tools based on the overall experience, not just functionality. Good defaults and good animations are real differentiators.


1. Frequency Rule (Non-Negotiable)

The frequency of an action determines its animation budget:

FrequencyAnimation BudgetExample
Hundreds of times/dayNone or drastically reducedKeyboard shortcuts, hover effects, list navigation
Tens of times/dayStandard, fast animationOpening modals, toggling states
OccasionalCan add characterToasts, feedback confirmations
Rare/first-timeCan add delightOnboarding, celebrations, feedback forms

Never animate keyboard-initiated actions. These actions are repeated hundreds of times daily. Animation makes them feel slow and disconnected.

Raycast has no open/close animation. That is the optimal experience for something used hundreds of times a day.


2. Duration Table

Rule: UI animations must stay under 300ms.

ElementDuration
Button press feedback100–160ms
Tooltips, small popovers125–200ms
Dropdowns, selects150–250ms
Modals, drawers200–500ms
Marketing/explanatoryCan be longer

A 180ms dropdown feels more responsive than a 400ms one. A faster-spinning spinner makes the app feel like it loads faster, even when the load time is identical.


3. Easing Rules

ContextEasingWhy
UI elements entering/appearingease-out or custom curveInstant visual feedback, then settles
UI elements exiting/disappearingease-in (short) or ease-out (if snapping away)Exits should feel quick, not linger
Hover/press feedbackease-outImmediate response to user action
Marketing/decorativeCustom cubic-bezierCharacter and brand expression

Never use:

  • linear for UI interactions (feels robotic)
  • ease-in for appearing elements (feels sluggish — user sees slow start)
  • ease-in-out as a default (the slow start adds unnecessary perceived delay)
  • transition: all (specify exact properties: transition: transform 200ms ease-out)

Perceived performance: ease-out at 200ms feels faster than ease-in at 200ms because the user sees immediate movement.


4. Spring Animations

Springs feel more natural than duration-based animations because they simulate real physics. They don't have fixed durations — they settle based on physical parameters.

When to use springs

  • Drag interactions with momentum
  • Elements that should feel "alive" (like Apple's Dynamic Island)
  • Gestures that can be interrupted mid-animation
  • Decorative mouse-tracking interactions
  • Any interaction where the user might change direction mid-gesture

Spring-based mouse interactions

Tying visual changes directly to mouse position feels artificial because it lacks motion. Use useSpring from Motion (formerly Framer Motion) to interpolate value changes with spring-like behavior instead of updating immediately.

When NOT to use springs

  • Simple show/hide transitions (duration-based is simpler and sufficient)
  • Keyboard-triggered UI (should be instant anyway)
  • Loading indicators (predictable timing is better)

5. Entry/Exit Patterns

Entry animations

Nothing in the real world appears from nothing.

BadGoodWhy
transform: scale(0)transform: scale(0.95); opacity: 0Starting from 0 implies materialization from void
opacity: 0 onlyopacity: 0; transform: translateY(8px)Pure fade lacks spatial context
All items appear at onceStagger with 30–80ms delay between itemsSequential reveal creates rhythm

Exit animations

Exit must be faster than enter. Users want to dismiss things quickly. The enter animation builds anticipation; the exit confirms the action.

  • Enter: 200–400ms (build anticipation)
  • Exit: 100–200ms (confirm dismissal)

Stagger pattern

css
.item {
    opacity: 0;
    transform: translateY(8px);
    animation: fadeIn 300ms ease-out forwards;
}

.item:nth-child(1) { animation-delay: 0ms; }
.item:nth-child(2) { animation-delay: 50ms; }
.item:nth-child(3) { animation-delay: 100ms; }
.item:nth-child(4) { animation-delay: 150ms; }

Keep stagger delays between 30–80ms. Shorter feels rushed, longer feels sluggish.


6. Transform-Origin

Popovers scale from their trigger. Modals stay centered.

css
/* Radix UI — popover scales from trigger */
.popover {
    transform-origin: var(--radix-popover-content-transform-origin);
}

/* Base UI equivalent */
.popover {
    transform-origin: var(--transform-origin);
}

/* Modal — always centered (not anchored to trigger) */
.modal {
    transform-origin: center;
}

The default transform-origin: center is wrong for almost every popover. Fix this for dropdowns, selects, tooltips, context menus — anything anchored to a trigger element.


7. Interruptibility: Transitions vs Keyframes

CSS transitions can be interrupted and retargeted mid-animation. Keyframes restart from zero.

For any interaction that can be triggered rapidly (adding toasts, toggling states, hover effects), transitions produce smoother results.

css
/* Interruptible — good for dynamic UI */
.toast {
    transition: transform 400ms ease;
}

/* NOT interruptible — avoid for dynamic UI */
@keyframes slideIn {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

Use keyframes only for:

  • One-shot animations (page load reveals)
  • Complex multi-step sequences
  • Animations that should NOT be interrupted

Use transitions for:

  • Anything the user can trigger repeatedly
  • Hover/focus/active states
  • Toast notifications, dropdowns, tooltips

8. Touch & Hover Safety

Hover media query (Non-Negotiable)

Touch devices trigger hover on tap, causing false positives. Gate hover animations behind:

css
@media (hover: hover) and (pointer: fine) {
    .button:hover {
        transform: scale(1.02);
    }
}

Tooltip skip-delay

Tooltips should delay before appearing (prevent accidental activation). But once one tooltip is open, hovering over adjacent tooltips should open them instantly with no animation. This feels faster without defeating the purpose of the initial delay.


9. Performance (Non-Negotiable)

Only animate compositable properties

  • transform (translate, scale, rotate)
  • opacity
  • filter (with caution)

Never animate: top, left, width, height, margin, padding, border-width — these trigger layout recalculation.

Hardware acceleration

For Motion/Framer Motion under load, prefer transform: "translateX()" string syntax over x/y shorthand props for explicit GPU compositing.

backdrop-blur warning

backdrop-blur on scrolling content is expensive. Only apply to fixed/sticky elements (navbar, floating toolbar), never to elements that scroll with the page.


10. Button & Press Feedback

Every interactive element must feel responsive to press:

css
.button:active {
    transform: scale(0.97);
}
ElementActive State
Buttonsscale(0.97) or scale(0.98)
Cards (clickable)scale(0.99) (subtle)
List itemstranslateY(1px) or scale(0.99)
Toggles/switchesSpring animation on state change

11. Review Format (Required)

When reviewing UI animation code, use a Before/After/Why table:

BeforeAfterWhy
transition: all 300mstransition: transform 200ms ease-outSpecify exact properties; avoid all
transform: scale(0)transform: scale(0.95); opacity: 0Nothing appears from nothing
ease-in on dropdownease-out with custom curveease-in feels sluggish on entry
No :active state on buttontransform: scale(0.97) on :activeButtons must feel responsive to press
transform-origin: center on popovertransform-origin: var(--radix-popover-content-transform-origin)Popovers scale from their trigger
Same enter/exit speedEnter 300ms, exit 150msExit confirms action, must feel quick
Elements all appear at onceStagger delay 30–80ms between itemsSequential reveal creates rhythm
Hover animation without media queryWrap in @media (hover: hover) and (pointer: fine)Touch devices trigger hover on tap
Duration > 300ms on UI elementReduce to 150–250msUI must feel responsive, not cinematic
Keyframes on rapidly-triggered elementCSS transitionsTransitions are interruptible

12. Sonner Principles (Building Loved Components)

These principles come from building Sonner (13M+ weekly npm downloads) and apply to any component:

  1. Developer experience is key. No hooks, no context, no complex setup. Insert <Toaster /> once, call toast() from anywhere. The less friction to adopt, the more people will use it.

  2. Good defaults matter more than options. Ship beautiful out of the box. Most users never customize. The default easing, timing, and visual design should be excellent.

  3. Naming creates identity. A memorable name feels more elegant than a descriptive one. Sacrifice discoverability for memorability when appropriate.

  4. Handle edge cases invisibly. Pause toast timers when the tab is hidden. Fill gaps between stacked toasts with pseudo-elements to maintain hover state. Capture pointer events during drag. Users never notice these, and that is exactly right.

  5. Use transitions, not keyframes, for dynamic UI. Toasts are added rapidly. Keyframes restart from zero on interruption. Transitions retarget smoothly.

  6. Build a great documentation site. Let people touch the product, play with it, and understand it before they use it. Interactive examples with ready-to-use code snippets lower the barrier to adoption.


Quick Reference: Common Fixes

IssueFix
transition: allSpecify exact properties
scale(0) entryStart from scale(0.95) with opacity: 0
ease-in on UI elementSwitch to ease-out or custom curve
transform-origin: center on popoverSet to trigger location (Radix/Base UI variable)
Animation on keyboard actionRemove animation entirely
Duration > 300ms on UIReduce to 150–250ms
Hover without media queryAdd @media (hover: hover) and (pointer: fine)
Keyframes on rapid-trigger elementUse CSS transitions
Same enter/exit speedMake exit faster (enter 300ms → exit 150ms)
All items appear at onceAdd stagger (30–80ms between items)

Attribution

This skill synthesizes animation principles from Emil Kowalski's design engineering articles and his work on Sonner, Vaul, and other open-source components. For the full course: animations.dev

常见问题

Ui Animation Engineering AI 技能有什么作用?

用于制定达到生产级水准的 UI 动画方案,涵盖时长、缓动、弹簧效果、transform-origin、可中断性、交错模式和感知性能。适用于评审动画、构建微交互,或 UI“感觉迟钝/不对劲”的情况。以下情形会触发:动画评审、动效设计、下拉菜单/模态框/Toast 动画、“感觉很慢”、“animation wirkt falsch”、微交互、悬停/激活状态。

为什么在 TypingMind 中使用 Ui Animation Engineering?

因为您只需安装一次,就能搭配任何模型使用。Ui Animation Engineering 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Ui Animation Engineering?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/alpham8/agentic-webdev/tree/master/skills/ui-animation-engineering。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Ui Animation Engineering?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Ui Animation Engineering 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Ui Animation Engineering 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Ui Animation Engineering AI 技能免费吗?

alpham8 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇