Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

swipe-react

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swipe-react

Easy integration!!! Easily add touch devices support (smartphones, tablets) to your react components, with swipe direction detection.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
517
decreased by-12.96%
Maintainers
1
Weekly downloads
 
Created
Source

swipe-react

Easy integration!!! Easily add touch devices support (smartphones, tablets) to your react components, with swipe direction detection.

Usage

  1. Install the npm package:
    npm install --save swipe-react
  1. Import it:
    import SwipeReact from 'swipe-react';
  1. Config swipe events ('left', 'right', 'up', 'down'), at least one of them, in your component constructor, or in render function:
    SwipeReact.config({
      left: () => {
        console.log('Swipe left detected.');
      },
      right: () => {
        console.log('Swipe right detected.');
      },
      up: () => {
        console.log('Swipe up detected.');
      },
      down: () => {
        console.log('Swipe down detected.');
      }
    });
  1. Integrate with your React component:
  <YourComponent {...SwipeReact.events} />

FAQs

Package last updated on 07 Aug 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc