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

FreeTapProps

A tap that calls onTap alone, for a game’s own action: it replaces no button the engine draws.

Property Type Default value Description
children ReactNode undefined One Icon.
className? string undefined An override that shows in the diff.
input? undefined undefined -
label string undefined The accessible name. A Tap shows an icon, not text.
look? boolean false Whether the finger that holds it also turns the camera as it drags, at the camera’s touchLookSpeed, so the player tracks a target while the button holds, as a weapon’s fire button does.
onMove? (travelX, travelY, pointerType) => void undefined Called with the CSS pixels the pressing pointer travelled across and down since its last move, while it is down, and its pointerType: what a button whose finger also turns the look, such as a fire button, reads.
onRelease? () => void undefined Called as the finger or the button that pressed it lets go, slides off, or the browser takes the touch: what a held control, a sprint or a block, ends on.
onTap () => void undefined Called once for each press.
slot? Slot Slot.BottomRight The slot it stands in.