Skip to content
Konjure / spatial intelligence

Click

← Builtin reference

A typed interaction contract with one click operation.

Signature

trait Click { func click() -> Unit; }

Implement Click when a type should satisfy a nominal interaction contract or appear in query[Click](). Hosts may also invoke an ordinary checked click method without this trait; the host owns event dispatch.

Methods

click

func click() -> Unit

Required action with no arguments. A direct record method may mutate its receiver; a bound component callback is required when that mutation must persist to an entity.

Examples

Implement a click action

A type satisfies the contract with a matching typed method.

Tick 0 · 0.00 s⌘ / Ctrl + EnterThis device
main.kj
Loading the language runtime…
Output 0
No output.
Expected output
clicked

Rust definition

Trait declaration checked by the interpreter; it is not a Rust SDK trait.

See also