Zum Inhalt springen
Skillpedia
Websites & UI (Frontend)48k · #5139

makepad-2-0-animation

Was er macht

Dieses Tool hilft dir, Animationen in Benutzeroberflächen mit der Makepad-Bibliothek zu erstellen. Visuelle Elemente können sich damit im Laufe der Zeit verändern, etwa für Hover-Effekte, Übergänge oder dauerhafte Animationen.

Wann du ihn nutzt

  • ✓Wenn ein Button beim Klicken seine Farbe wechseln soll.
  • ✓Wenn ein Element sanft eingeblendet werden soll.
  • ✓Wenn du einen animierten Ladeeffekt erstellen willst.

Link zum Skill

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

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-2-0-animation/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Wie bringe ich einen Button dazu, seine Farbe zu ändern, wenn die Maus darüberfährt?”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Du definierst einen 'Animator' für ein Element. Dieser steuert, wie sich visuelle Eigenschaften (etwa Farbe oder Größe) zwischen verschiedenen 'States' (z. B. 'normal' und 'hover') verändern, mit festgelegten Zeiten und Effekten.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von 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

…

Häufige Fragen

Kann man alle Elemente animieren?

Nein. Manche Elemente wie 'View' und 'Button' unterstützen Animationen, andere wie 'Label' und 'Image' nicht direkt. Um ein 'Label' zu animieren, musst du es in eine 'View' packen, die animiert werden kann.

Was sind Animations-'Groups'?

Groups sind unabhängige Animationsspuren, die gleichzeitig ablaufen können. Häufige Beispiele sind 'hover' (für die Maus), 'focus' (wenn ein Element ausgewählt ist) und 'time' (für dauerhafte Animationen).

Wie mache ich eine Animation schneller oder langsamer?

Du kannst die 'duration' des Übergangs in Sekunden anpassen. Außerdem kannst du 'ease functions' wählen, die festlegen, wie schnell die Animation an verschiedenen Punkten abläuft, zum Beispiel langsam beginnen und dann beschleunigen oder umgekehrt.

Details

Originalbeschreibung des Autors

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

repo: sickn33/agentic-awesome-skills

Beliebtheit

GitHub-Sterne
48k
Platz im Ranking
#5139
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills