makepad-2-0-animation
Skill này làm gì
Công cụ này giúp tạo hoạt ảnh cho giao diện bằng thư viện Makepad. Các phần tử có thể đổi diện mạo theo thời gian, tạo hiệu ứng như trạng thái khi rê chuột, chuyển cảnh hoặc hoạt ảnh liên tục.
Khi nào nên dùng
- ✓Khi bạn muốn một nút đổi màu khi được nhấn.
- ✓Khi bạn muốn một phần tử mờ dần xuất hiện một cách mượt mà.
- ✓Khi bạn muốn tạo hiệu ứng tải có hoạt ảnh.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-2-0-animation/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Làm sao để một nút đổi màu khi con trỏ chuột di chuyển lên trên?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Bạn định nghĩa một 'animator' cho một phần tử. Animator này điều khiển cách các thuộc tính hình ảnh (như màu hoặc kích thước) thay đổi giữa các 'trạng thái' (như 'bình thường' và 'rê chuột') theo thời gian và hiệu ứng đã định.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
When to Use
- Use when this upstream workflow matches the user's stated goal.
- Use when the task requires the procedures documented in this skill.
Makepad 2.0 Animation Skill
Version: makepad-widgets (dev branch) | Last Updated: 2026-03-03
Overview
The Animator system drives instance() shader variables over time, enabling hover effects, transitions, and looping animations. It uses independent animation tracks called "groups" that run simultaneously.
Documentation
Refer to the local files for detailed documentation:
./references/animator-reference.md- Complete Animator API, play types, ease functions, examples
IMPORTANT: Documentation Completeness Check
Before answering questions, Claude MUST:
- Read the relevant reference file(s) listed above
- If file read fails or file is empty:
- Inform user: "Reference docs incomplete. Still answering based on SKILL.md patterns."
- Still answer based on SKILL.md patterns + built-in knowledge
- If reference file exists, incorporate its content into the answer
Critical: Widget Animator Support
NOT all widgets support animator! Adding animator: Animator{...} to an unsupported widget is silently ignored - no error, no animation, nothing happens.
Widgets that SUPPORT Animator
View, SolidView, RoundedView, ScrollXView, ScrollYView, ScrollXYView, Button, ButtonFlat, ButtonFlatter, CheckBox, Toggle, RadioButton, LinkLabel, TextInput
Widgets that DO NOT Support Animator
Label, H1-H4, P, TextBox, Image, Icon, Markdown, Html, Slider, DropDown, Splitter, Hr, Filler
To animate a Label: Wrap it in a View with the animator:
View{
width: Fit height: Fit
animator: Animator{
hover: {
default: @off
off: AnimatorState{ from: {all: Forward {duration: 0.15}} apply: {draw_bg: {hover: 0.0}} }
on: AnimatorState{ from: {all: Forward {duration: 0.15}} apply: {draw_bg: {hover: 1.0}} }
}
}
label := Label{text: "Animated via parent"}
}
Animator Structure
animator: Animator{
<group_name>: {
default: @<state_name>
<state_name>: AnimatorState{
from: { ... }
ease: <EaseFunction>
redraw: true
apply: { ... }
}
<state_name>: AnimatorState{ ... }
}
<group_name>: { ... }
}
Groups
Each group is an independent animation track. Common groups:
| Group | Purpose | Typical States |
|---|---|---|
hover |
Mouse hover in/out | off, on |
focus |
Keyboard focus | off, on |
active |
Toggled/checked state | off, on |
disabled |
Disabled state | off, on |
time |
Continuous looping | off, on |
Multiple groups animate simultaneously without interfering.
The from Block
Controls transition timing. Keys are states being transitioned FROM, or all as catch-all.
// From any state, animate over 0.2 seconds
from: {all: Forward {duration: 0.2}}
// Instant from any state
from: {all: Snap}
// Different timing depending on origin
from: {
all: Forward {duration: 0.1}
down: Forward {duration: 0.01}
}
Play Types
| Type | Description | Example |
|---|---|---|
Forward {duration: 0.2} |
One-shot forward | Hover transitions |
Snap |
Instant jump, no animation | Default state initialization |
Loop {duration: 1.0} |
Looping animation | Loading spinners |
ReverseLoop {duration: 1.0} |
Ping-pong loop | Pulsing effects |
BounceLoop {duration: 1.0} |
Bounce back and forth | Bouncing animations |
Ease Functions
| Function | Description |
|---|---|
Linear |
Constant speed |
InQuad / OutQuad / InOutQuad |
Quadratic easing |
InCubic / OutCubic / InOutCubic |
Cubic easing |
InQuart / OutQuart / InOutQuart |
Quartic easing |
InQuint / OutQuint / InOutQuint |
Quintic easing |
InSine / OutSine / InOutSine |
Sine easing |
InExp / OutExp / InOutExp |
Exponential easing |
InCirc / OutCirc / InOutCirc |
Circular easing |
InElastic / OutElastic / InOutElastic |
Elastic spring |
InBack / OutBack / InOutBack |
Overshoot |
InBounce / OutBounce / InOutBounce |
Bounce |
Usage: ease: OutCubic in the AnimatorState (optional, defaults to Linear).
The apply Block
…
Câu hỏi thường gặp
Tất cả phần tử đều tạo được hoạt ảnh không?
Không. Một số phần tử như 'View' và 'Button' hỗ trợ hoạt ảnh, còn 'Label' và 'Image' thì không trực tiếp. Để tạo hoạt ảnh cho 'Label', bạn cần đặt nó trong một 'View' có thể tạo hoạt ảnh.
“Group” trong hoạt ảnh là gì?
Group là các làn hoạt ảnh độc lập, có thể chạy cùng lúc. Ví dụ phổ biến gồm 'hover' (khi rê chuột), 'focus' (khi phần tử được chọn) và 'time' (hoạt ảnh liên tục).
Làm sao để hoạt ảnh nhanh hơn hoặc chậm hơn?
Bạn có thể chỉnh 'duration' của chuyển đổi, tính bằng giây. Bạn cũng có thể chọn 'ease functions' để kiểm soát tốc độ tại các thời điểm khác nhau, như bắt đầu chậm rồi nhanh dần, hoặc ngược lại.
Chi tiết
Mô tả gốc của tác giả
Makepad 2.0 guidance for animation; use when building or debugging Makepad UI code.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #5139
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.