本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)48k · #5139

makepad-2-0-animation

できること

このツールは、Makepadライブラリを使ってユーザーインターフェースのアニメーションを作成するのに役立ちます。ビジュアル要素を時間に応じて見た目を変化させられ、ホバー時の状態変化、トランジション、連続的なアニメーションなどの効果を実現できます。

使う場面

  • ✓ボタンをクリックしたときに色が変わるようにしたいとき。
  • ✓要素をなめらかにフェードインさせたいとき。
  • ✓アニメーションするローディング効果を作りたいとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-2-0-animation/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“マウスをボタンに重ねたときに色が変わるようにするには、どうすればよいですか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

要素に対して'animator'を定義します。このanimatorは、定義されたタイミングや効果を使って、'normal'や'hover'などの'state'(状態)の間で、色やサイズなどのビジュアルプロパティがどのように変化するかを制御します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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:

  1. Read the relevant reference file(s) listed above
  2. 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
  3. 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

…

よくある質問

すべての要素をアニメーションできますか?

いいえ。'View'や'Button'はアニメーションに対応していますが、'Label'や'Image'は直接はアニメーションできません。'Label'をアニメーションさせるには、アニメーション可能な'View'で囲む必要があります。

アニメーションの「group」とは何ですか?

groupは、同時に実行できる独立したアニメーションのトラックのようなものです。代表的なものに、マウス操作用の'hover'、要素が選択されたときの'focus'、連続的なアニメーション用の'time'があります。

アニメーションを速くしたり遅くしたりするにはどうすればよいですか?

トランジションの'duration'(時間)を秒単位で調整できます。また、イージング関数(ease functions)を選ぶと、ゆっくり始まって速くなる、またはその逆など、アニメーションの途中での速度を制御できます。

詳細

作者による元の説明

Makepad 2.0 guidance for animation; use when building or debugging Makepad UI code.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#5139
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル