From antigravity-awesome-skills
Generates Makepad UI animation code including hover states, transitions, timelines, and easing functions. Use when building or debugging animator-driven interactions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/antigravity-awesome-skills:makepad-animationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **Version:** makepad-widgets (dev branch) | **Last Updated:** 2026-01-19
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:
animator, state changes, easing, keyframes, or visual interaction feedback.Refer to the local files for detailed documentation:
./references/animation-system.md - Complete animation referenceFor 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 |
Before answering questions, Claude MUST:
/sync-crate-skills makepad --force 更新文档"<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 }
}
}
}
}
}
<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 } }
}
}
}
}
<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
}
}
}
}
}
}
<Button> {
animator: {
disabled = {
default: off
off = {
from: { all: Snap }
apply: {
draw_bg: { color: #0066CC }
draw_text: { color: #FFFFFF }
}
}
on = {
from: { all: Snap }
apply: {
draw_bg: { color: #333333 }
draw_text: { color: #666666 }
}
}
}
}
}
| Property | Description |
|---|---|
animator | Root animation container |
{state} = | State definition (hover, pressed, focus, disabled) |
default: | Initial state value |
{value} = | State value definition (on, off, custom) |
from: | Transition timeline |
apply: | Properties to animate |
| Type | Description |
|---|---|
Forward { duration: f64 } | Linear forward animation |
Snap | Instant change, no transition |
Reverse { duration: f64, end: f64 } | Reverse animation |
Loop { duration: f64, end: f64 } | Looping animation |
BounceLoop { duration: f64, end: f64 } | Bounce loop animation |
// Basic
Linear
// Quadratic
InQuad, OutQuad, InOutQuad
// Cubic
InCubic, OutCubic, InOutCubic
// Quartic
InQuart, OutQuart, InOutQuart
// Quintic
InQuint, OutQuint, InOutQuint
// Sinusoidal
InSine, OutSine, InOutSine
// Exponential
InExp, OutExp, InOutExp
// Circular
InCirc, OutCirc, InOutCirc
// Elastic
InElastic, OutElastic, InOutElastic
// Back
InBack, OutBack, InOutBack
// Bounce
InBounce, OutBounce, InOutBounce
// Custom
ExpDecay { d1: f64, d2: f64 }
Bezier { cp0: f64, cp1: f64, cp2: f64, cp3: f64 }
Pow { begin: f64, end: f64 }
from: {
all: Ease { duration: 0.3, ease: InOutQuad }
}
| State | Values | Trigger |
|---|---|---|
hover | on, off | Mouse enter/leave |
pressed / down | on, off | Mouse press/release |
focus | on, off | Focus gain/lose |
disabled | on, off | Widget enabled/disabled |
selected | on, off | Selection change |
Most draw_* shader uniforms can be animated:
color, border_color, shadow_colorborder_size, border_radius, shadow_radiusscale, rotation, offsetopacitydefault: for initial stateForward for smooth transitionsSnap for instant state changes (like disabled)draw_bg, draw_text, etc.pub trait AnimatorImpl {
// Animate to state
fn animator_play(&mut self, cx: &mut Cx, state: &[LiveId; 2]);
// Cut to state (no animation)
fn animator_cut(&mut self, cx: &mut Cx, state: &[LiveId; 2]);
// Check current state
fn animator_in_state(&self, cx: &Cx, state: &[LiveId; 2]) -> bool;
}
// Usage example
fn handle_event(&mut self, cx: &mut Cx, event: &Event, scope: &mut Scope) {
match event.hits(cx, self.area()) {
Hit::FingerHoverIn(_) => {
self.animator_play(cx, id!(hover.on));
}
Hit::FingerHoverOut(_) => {
self.animator_play(cx, id!(hover.off));
}
Hit::FingerDown(_) => {
self.animator_play(cx, id!(pressed.on));
}
Hit::FingerUp(_) => {
self.animator_play(cx, id!(pressed.off));
}
_ => {}
}
}
from defines HOW to animate, apply defines WHAT to animateid!(state.value) macro to reference animation states in Rustnpx claudepluginhub sickn33/antigravity-awesome-skills --plugin antigravity-bundle-aas-mobile-app-builderGenerates Makepad animation code and explains states, transitions, hovers, pressed effects, and timelines for Rust UI widgets.
Implements animations in Makepad 2.0 UI widgets using Animator for hover effects, focus, transitions, and states with ease functions and groups.
Generates Makepad Rust app boilerplate with live_design!, app_main!, Cargo.toml setup, and event handling. Use for project initialization, getting started, and basic structure.