Logo Ui Animation Engineering

Ui Animation Engineering

Cộng đồng
alpham8
ui-animation-engineering

Đưa ra quyết định về hoạt ảnh giao diện đạt chuẩn sản phẩm: thời gian, easing, hiệu ứng lò xo, transform-origin, khả năng ngắt giữa chừng, hiệu ứng xuất hiện lần lượt và cảm nhận về hiệu suất. Dùng khi đánh giá hoạt ảnh, xây dựng tương tác vi mô hoặc khi giao diện có vẻ “ì ạch/không ổn”. Kích hoạt khi đánh giá hoạt ảnh, thiết kế chuyển động, hoạt ảnh dropdown/modal/toast, giao diện “có vẻ chậm”, “animation wirkt falsch”, tương tác vi mô hoặc trạng thái hover/active.

Add to TypingMind

Tổng quan

Nhà phát hànhalpham8
Kho mãagentic-webdev
Tên kỹ năngui-animation-engineering
Sao
4
Bản fork
0
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được alpham8 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Ui Animation Engineering trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/alpham8/agentic-webdev/tree/master/skills/ui-animation-engineering
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Ui Animation Engineering trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Ui Animation Engineering ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Ui Animation Engineering với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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

Câu hỏi thường gặp

Kỹ năng AI Ui Animation Engineering làm được gì?

Đưa ra quyết định về hoạt ảnh giao diện đạt chuẩn sản phẩm: thời gian, easing, hiệu ứng lò xo, transform-origin, khả năng ngắt giữa chừng, hiệu ứng xuất hiện lần lượt và cảm nhận về hiệu suất. Dùng khi đánh giá hoạt ảnh, xây dựng tương tác vi mô hoặc khi giao diện có vẻ “ì ạch/không ổn”. Kích hoạt khi đánh giá hoạt ảnh, thiết kế chuyển động, hoạt ảnh dropdown/modal/toast, giao diện “có vẻ chậm”, “animation wirkt falsch”, tương tác vi mô hoặc trạng thái hover/active.

Vì sao nên dùng Ui Animation Engineering trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Ui Animation Engineering là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Ui Animation Engineering trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/alpham8/agentic-webdev/tree/master/skills/ui-animation-engineering. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Ui Animation Engineering?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Ui Animation Engineering với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Ui Animation Engineering với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Ui Animation Engineering có miễn phí không?

Kỹ năng này được alpham8 phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇