Socket
Socket
Sign inDemoInstall

korol-joystick

Package Overview
Dependencies
2
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    korol-joystick

React Native Joystick


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

React Native Joystick

NPM

runs with Expo Go

TOC

Installation

PreInstallation
yarn add react-native-gesture-handler

NPM

npm install korol-joystick

YARN

yarn add korol-joystick

Preview

React Native Axis Pad: Screen Preview

Usage

import { KorolJoystick } from "korol-joystick";
<KorolJoystick color="#06b6d4" radius={75} onMove={(data) => console.log(data)}>

Props

radius

Set the size radius of the container circle The inside joystick radius is 1/3 of this size Type: Number

color

Set the color scheme of the joystick The color of the container and the joystick is set based on this color with a set opacity.

type: HEX Color Code

onMove, onStart, onStop

A callback function with an argument of type MoveJoystickEvent.

type: Function

Types

MoveJoystickEvent

Event returned by the onMove, onStart and onStop callbacks.

{
  type: "move" | "stop" | "start";
  position: {
    x: number;
    y: number;
  }
  force: number;
  angle: {
    radian: number;
    degree: number;
  }
}

Keywords

FAQs

Last updated on 18 Oct 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc