Skip to content

@modoki/engine / index / UIActionBinding

Interface: UIActionBinding

One event→response binding on a UIAction. This is the trait's own schema — ui/bindings.ts (the applying logic) imports it from here, not the reverse.

Traits

action?

optional action?: string

Action name (system-owned or engine built-in).


component?

optional component?: string

Component (trait) name to write, e.g. 'UIElement'.


event

event: UIActionEvent

Which interaction fires this binding. Defaults to 'click' when omitted.


kind

kind: UIActionKind

What the binding does.


params?

optional params?: Record<string, unknown>

Typed arguments for the action; values may be the '$value' token.


property?

optional property?: string

Field on that component, e.g. 'isVisible'.


target?

optional target?: string

Target entity GUID. For 'set' it's the entity written; for 'call' it's passed to the handler as ctx.target. Empty → the element's own entity.


value?

optional value?: unknown

Value to write — typed by the field's FieldHint, or the token '$value'.

Built with Modoki.