Socket
Socket
Sign inDemoInstall

react-easy-swipe

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-easy-swipe

React easy swipe - Easy handler for common touch operations


Version published
Weekly downloads
316K
increased by5.74%
Maintainers
1
Weekly downloads
 
Created

What is react-easy-swipe?

The react-easy-swipe package is a lightweight React component that provides easy-to-use swipe detection for touch devices. It allows developers to handle swipe events such as swiping left, right, up, and down, making it useful for implementing features like carousels, sliders, and other touch-based interactions.

What are react-easy-swipe's main functionalities?

Swipe Detection

This feature allows you to detect swipe movements in different directions. The code sample demonstrates how to use the Swipe component to handle swipe left, swipe right, and swipe move events.

```jsx
import React from 'react';
import Swipe from 'react-easy-swipe';

class SwipeComponent extends React.Component {
  onSwipeMove(position, event) {
    console.log('Moved to:', position);
  }

  onSwipeLeft(event) {
    console.log('Swiped left!');
  }

  onSwipeRight(event) {
    console.log('Swiped right!');
  }

  render() {
    return (
      <Swipe
        onSwipeMove={this.onSwipeMove}
        onSwipeLeft={this.onSwipeLeft}
        onSwipeRight={this.onSwipeRight}
      >
        <div style={{ width: '100%', height: '100px', background: 'lightgray' }}>
          Swipe me!
        </div>
      </Swipe>
    );
  }
}

export default SwipeComponent;
```

Other packages similar to react-easy-swipe

Keywords

FAQs

Package last updated on 24 Oct 2018

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