Skip to main content
skill CX Codex

makepad-2.0-events: a skill for Makepad 2.0 events

The makepad-2.0-events skill gives your agent a map of event and action handling in Makepad 2.0, from Splash on_click to the Rust MatchEvent trait.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-events -a claude-code
Open on GitHub

What makepad-2.0-events does

Makepad 2.0 splits event handling across two layers. Inside script_mod! Splash code, handlers sit next to the widgets: on_click, on_render, on_return, on_startup. That covers plain interactivity — a button press, typed text, a redrawn list. The Rust side is the MatchEvent trait, with methods such as handle_actions, handle_timer and handle_http_response. Business logic, network calls and anything needing full Rust belong there.

Two macros connect the layers. script_eval!(cx, { ... }) runs Splash code from Rust, so you can update state and kick off a render. script_apply_eval!(cx, widget_ref, { ... }) patches widget properties at runtime. The skill covers both and says when each fits.

Splash handlers use closure syntax: || for no arguments, |checked| when a value comes in. CheckBox passes its new state, TextInput catches Enter through on_return. on_render does not fire on its own — you call ui.widget_name.render(), and new_batch: true on a view clears the previous draw content first. That last part trips people up.

The Rust section groups the trait methods: lifecycle (handle_startup, handle_shutdown, handle_pause, handle_resume), window focus, frames, widget actions, keys, timers, drawing, HTTP responses and progress, signals, audio devices, MIDI ports, video inputs. By default handle_actions walks every action and calls handle_action for each one.

What it helps with

  • Wire a button press to a state change in Splash code
  • Redraw a list after an item is added or removed
  • Catch Enter in a TextInput and submit the form
  • Keep the split clean: Splash for UI, Rust for network and timers
  • Call Splash from Rust with script_eval! and patch widget properties

Example prompts for the agent

  • Add an on_click handler to the add button and clear the input field afterwards
  • Make the list re-render after an item is deleted, using on_render
  • Handle the HTTP response in Rust with handle_http_response and refresh the UI

How to install makepad-2.0-events

1Skills CLI (Vercel)

npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-events -a claude-code

2Manually: put the files in place

~/.claude/skills/makepad-2.0-events/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/makepad-2.0-events/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about makepad-2.0-events

How do I install makepad-2.0-events in Claude Code?

Run npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-events -a claude-code. The skill file lands at ~/.claude/skills/makepad-2.0-events/SKILL.md.

What does makepad-2.0-events do?

It documents event and action handling in Makepad 2.0: inline Splash handlers and the Rust MatchEvent trait, plus the two bridge macros between them.

How do the two event layers in Makepad 2.0 differ?

The Splash layer keeps handlers next to widgets and suits simple interactivity. The Rust layer, through MatchEvent, takes business logic, network calls and timers.

Similar skills

Everything for Frontend and UI →

From the same set5

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor