Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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 悬停效果
.claude/skills/sickn33-makepad-animation/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 74% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 124% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 58% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 69% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 62% | 0% |
> 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 更新文档"rust<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 } } } } } }
rust<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 } } } } } }
rust<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 } } } } } }
rust<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 |
rust// 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 }
rustfrom: { 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.rustpub 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 Rust| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 13,936 | 5,938 | -57% | 1 | 1 | 0% | 2,751 | 3,443 | +25% | 0 | 0 | — |
case-02 | pass→pass | 14,773 | 12,849 | -13% | 1 | 1 | 0% | 3,284 | 4,919 | +50% | 0 | 0 | — |
case-03 | fail→pass | 14,104 | 12,230 | -13% | 1 | 1 | 0% | 2,706 | 4,696 | +74% | 0 | 0 | — |
case-04 | pass→pass | 12,289 | 6,489 | -47% | 1 | 1 | 0% | 2,105 | 3,763 | +79% | 0 | 0 | — |
case-05 | pass→pass | 17,679 | 8,156 | -54% | 1 | 1 | 0% | 3,053 | 3,771 | +24% | 0 | 0 | — |
case-06 | pass→pass | 8,345 | 4,119 | -51% | 1 | 1 | 0% | 1,520 | 2,946 | +94% | 0 | 0 | — |
case-07 | fail→pass | 8,118 | 5,965 | -27% | 1 | 1 | 0% | 1,473 | 3,300 | +124% | 0 | 0 | — |
case-08 | pass→pass | 11,584 | 9,071 | -22% | 1 | 1 | 0% | 2,601 | 3,957 | +52% | 0 | 0 | — |
case-09 | pass→pass | 7,704 | 2,968 | -61% | 1 | 1 | 0% | 1,371 | 2,766 | +102% | 0 | 0 | — |
case-10 | fail→pass | 13,271 | 7,653 | -42% | 1 | 1 | 0% | 2,314 | 3,648 | +58% | 0 | 0 | — |
case-11 | fail→pass | 13,394 | 10,682 | -20% | 1 | 1 | 0% | 2,537 | 4,295 | +69% | 0 | 0 | — |
case-12 | pass→pass | 7,086 | 3,525 | -50% | 1 | 1 | 0% | 1,320 | 2,885 | +119% | 0 | 0 | — |
case-13 | pass→pass | 9,067 | 4,277 | -53% | 1 | 1 | 0% | 1,559 | 2,955 | +90% | 0 | 0 | — |
case-14 | fail→pass | 9,493 | 3,927 | -59% | 1 | 1 | 0% | 1,844 | 2,993 | +62% | 0 | 0 | — |
case-15 | fail→pass | 6,954 | 3,997 | -43% | 1 | 1 | 0% | 1,301 | 2,949 | +127% | 0 | 0 | — |
case-16 | fail→pass | 10,920 | 7,138 | -35% | 1 | 1 | 0% | 1,878 | 3,429 | +83% | 0 | 0 | — |
case-17 | fail→pass | 5,302 | 3,522 | -34% | 1 | 1 | 0% | 868 | 2,880 | +232% | 0 | 0 | — |
case-18 | pass→pass | 10,701 | 5,215 | -51% | 1 | 1 | 0% | 1,967 | 3,261 | +66% | 0 | 0 | — |
case-19 | fail→pass | 12,718 | 5,621 | -56% | 1 | 1 | 0% | 2,293 | 3,275 | +43% | 0 | 0 | — |
case-20 | pass→pass | 8,867 | 8,043 | -9% | 1 | 1 | 0% | 1,808 | 3,803 | +110% | 0 | 0 | — |
case-21 | pass→pass | 17,246 | 13,916 | -19% | 1 | 1 | 0% | 3,134 | 4,683 | +49% | 0 | 0 | — |
case-22 | fail→pass | 20,884 | 19,680 | -6% | 1 | 1 | 0% | 3,957 | 6,261 | +58% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +45 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.