You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

react-easy-swipe

Package Overview
Dependencies
1
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

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
Maintainers
1
Created

Package description

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

Readme

Source

REACT SWIPE

Generated using react-init

TODOs

  • write tests
  • write docs

Keywords

FAQs

Package last updated on 06 Jan 2016

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc