Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)48k · #5144

makepad-animation

Skill này làm gì

Công cụ này giúp tạo hoạt ảnh trực quan cho giao diện người dùng trong framework Makepad. Bạn có thể định nghĩa cách phần tử đổi màu, kích thước hoặc thuộc tính khác khi người dùng tương tác, như rê chuột hoặc nhấn.

Khi nào nên dùng

  • ✓Khi bạn tạo một nút đổi màu khi rê chuột.
  • ✓Khi bạn làm một phần tử phóng to khi được nhấn.
  • ✓Khi bạn định nghĩa cách một ô văn bản đổi màu khi được chọn.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-animation/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-animation/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo hoạt ảnh cho một nút bấm chuyển sang màu xanh lá khi con trỏ chuột di chuyển lên, và trở lại bình thường khi con trỏ rời đi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn định nghĩa các 'trạng thái' (như 'bình thường' và 'rê chuột') và cách Makepad làm hoạt ảnh khi chuyển giữa các trạng thái, chỉ định thời lượng và các thuộc tính thay đổi (màu, kích thước).

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.

Supporting material availability

This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files:

  • ./references/animation-system.md

Ask for the original supporting material or an existing installation before using a step that depends on these paths; this catalog does not identify a verified download source for them. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable.

Makepad Animation Skill

Version: makepad-widgets (dev branch) | Last Updated: 2026-01-19

Check for updates: https://crates.io/crates/makepad-widgets

You are an expert at Makepad animations. Help users by:

  • Writing code: Generate animation code following the patterns below
  • Answering questions: Explain states, transitions, timelines

When to Use

  • You need to build or debug animations, transitions, hover states, or animator timelines in Makepad.
  • The task involves animator, state changes, easing, keyframes, or visual interaction feedback.
  • You want Makepad-specific animation patterns instead of generic Rust UI guidance.

Documentation

Refer to the local files for detailed documentation:

  • ./references/animation-system.md - Complete animation reference

Advanced Patterns

For production-ready animation patterns, see the _base/ directory:

Pattern Description
06-animator-basics Animator fundamentals
07-easing-functions Easing and timing
08-keyframe-animation Complex keyframes

IMPORTANT: Documentation Completeness Check

Before answering questions, Claude MUST:

  1. Read the relevant reference file(s) listed above
  2. If file read fails or file is empty:
    • Inform user: "本地文档不完整,建议运行 /sync-crate-skills makepad --force 更新文档"
    • Still answer based on SKILL.md patterns + built-in knowledge
  3. If reference file exists, incorporate its content into the answer

Key Patterns

1. Basic Hover Animation

<Button> {
    text: "Hover Me"

    animator: {
        hover = {
            default: off

            off = {
                from: { all: Forward { duration: 0.15 } }
                apply: {
                    draw_bg: { color: #333333 }
                }
            }

            on = {
                from: { all: Forward { duration: 0.15 } }
                apply: {
                    draw_bg: { color: #555555 }
                }
            }
        }
    }
}

2. Multi-State Animation

<View> {
    animator: {
        hover = {
            default: off
            off = {
                from: { all: Forward { duration: 0.2 } }
                apply: { draw_bg: { color: #222222 } }
            }
            on = {
                from: { all: Forward { duration: 0.2 } }
                apply: { draw_bg: { color: #444444 } }
            }
        }

        pressed = {
            default: off
            off = {
                from: { all: Forward { duration: 0.1 } }
                apply: { draw_bg: { scale: 1.0 } }
            }
            on = {
                from: { all: Forward { duration: 0.1 } }
                apply: { draw_bg: { scale: 0.95 } }
            }
        }
    }
}

3. Focus State Animation

<TextInput> {
    animator: {
        focus = {
            default: off

            off = {
                from: { all: Forward { duration: 0.2 } }
                apply: {
                    draw_bg: {
                        border_color: #444444
                        border_size: 1.0
                    }
                }
            }

            on = {
                from: { all: Forward { duration: 0.2 } }
                apply: {
                    draw_bg: {
                        border_color: #0066CC
                        border_size: 2.0
                    }
                }
            }
        }
    }
}

4. Disabled State

<Button> {
    animator: {
        disabled = {
            default: off

            off = {

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

“Trạng thái” trong hoạt ảnh là gì?

Trạng thái là các diện mạo khác nhau mà một phần tử có thể có, như 'bình thường', 'rê chuột' (con trỏ đang ở trên), 'đã nhấn' hoặc 'vô hiệu hóa'.

“Duration” nghĩa là gì?

Duration là thời gian để hoạt ảnh chuyển từ trạng thái này sang trạng thái khác. Giá trị nhỏ hơn nghĩa là hoạt ảnh nhanh hơn.

“Snap” là gì?

“Snap” nghĩa là thay đổi từ trạng thái này sang trạng thái khác xảy ra tức thì, không có hoạt ảnh.

Chi tiết

Mô tả gốc của tác giả

CRITICAL: Use for Makepad animation system. Triggers on: makepad animation, makepad animator, makepad hover, makepad state, makepad transition, "from: { all: Forward", makepad pressed, makepad 动画, makepad 状态, makepad 过渡, makepad 悬停效果

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5144
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự