Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

UseActionOptions

What useAction takes.

Property Type Default value Description
enabled? boolean true Whether it listens now, so its touch button draws: false while the action can do nothing, such as a rotate with nothing in hand, as Roblox’s UnbindAction.
onPress? (event) => void undefined On each press of one of its keys or its touch button; with repeat, on the keyboard’s repeats of a held key too, repeat then true.
onRelease? () => void undefined When the last key or touch holding it lets go, the page is blurred or hidden, or the listener goes.
repeat? boolean undefined Whether a held key’s repeats call onPress too.