A host-rendered control with a typed no-argument action.
Signature
The host invokes action through Machine::invoke_component. The default noop is intentional; a Button schema never dispatches an action by itself.
Fields
label: Str- Visible label; defaults to Button.Default
"Button"
Examples
Use the default action
The default callback is callable and produces no log output.
main.kj
Loading…Drag to orbit · select to inspect
0 entities
Scene controls
Results
Loading the language runtime…
Output 0
No output.
State
Compile source to inspect its values.
TraceNo execution yet
- Executed source spans appear here.
Expected output
Button
Expose a clickable control
The spawned control retains a typed callback for host click dispatch; initialization makes the example's ready state observable.
main.kj⌘ / Ctrl + Enter
Loading…Drag to orbit · select to inspect
0 entities
Scene controls
Results
Loading the language runtime…
Output 0
No output.
State
Compile source to inspect its values.
TraceNo execution yet
- Executed source spans appear here.
Expected output
button ready
Rust definition
Interpreter RecordValue UI schema; host input dispatch owns actual clicks.
View Rust documentation →Support: host UI