Skip to content

JoystickProps

Defined in: packages/ui/src/components/Joystick.tsx:44

Property Type Default value Description
className? string undefined Placement and visibility, such as showing it only on touch screens.
grabMargin? number 8 How far past the drawn ring a thumb still catches the stick, in the ring’s own units. The ring grows to fill it on the grab, which is what tells the player what they caught.
onSteer (direction) => void undefined Where the thumb is, on the unit disc: x right, y up the screen. (0, 0) while nothing holds it, and on release. A fresh vector each time, so the caller may keep one.