Aller au contenu
Skillpedia
Sites et interfaces (frontend)48k · #5139

makepad-2-0-animation

Ce qu’il fait

Cet outil vous aide à créer des animations dans les interfaces utilisateur avec la bibliothèque Makepad. Il permet aux éléments visuels de changer d'apparence au fil du temps, ce qui rend possibles des effets comme les états au survol, les transitions ou les animations continues.

Quand l’utiliser

  • ✓Quand vous voulez qu'un bouton change de couleur lorsqu'on clique dessus.
  • ✓Quand vous voulez qu'un élément apparaisse en fondu en douceur.
  • ✓Quand vous voulez créer un effet de chargement animé.

Lien du skill

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

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-2-0-animation/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Comment faire pour qu'un bouton change de couleur quand la souris passe dessus ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

Vous définissez un « animator » pour un élément. Cet animator contrôle la façon dont les propriétés visuelles (comme la couleur ou la taille) changent entre différents « states » (comme « normal » et « hover ») selon des durées et des effets définis.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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

…

Questions fréquentes

Tous les éléments peuvent-ils être animés ?

Non. Certains éléments comme « View » et « Button » supportent l'animation, mais d'autres comme « Label » et « Image » ne le font pas directement. Pour animer un « Label », vous devez l'insérer dans une « View » qui peut être animée.

Que sont les « groups » d'animation ?

Les groupes sont comme des pistes d'animation indépendantes qui peuvent se dérouler en même temps. Les exemples courants sont « hover » (pour la souris), « focus » (lorsqu'un élément est sélectionné) et « time » (pour les animations continues).

Comment rendre une animation plus rapide ou plus lente ?

Vous pouvez ajuster la « duration » de la transition en secondes. Vous pouvez aussi choisir des « ease functions », qui contrôlent la vitesse de l'animation à différents moments, par exemple démarrer lentement puis accélérer, ou l'inverse.

Détails

Description originale de l’auteur

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

repo: sickn33/agentic-awesome-skills

Popularité

Étoiles GitHub
48k
Position au classement
#5139
Licence
MIT
Mis à jour
15/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires