0.0.2 • Published 4 years ago

react-swipe-me v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

React Swipe Me (WIP)

This is a simple ReactJS library that solves your problem with creating swipeable menus, clipboards and everything you want. With this library you can easly create component that is swipeable from every screen edge. All you have to do is install library, import it and create SwipeMe component with your children and many props.

SwipeMe component can be controlled by click on desktop and fully swiped by touching on your touch devices.

Installation

There are two different ways to install SwipeMe

with Yarn:

yarn add react-swipe-me

or with NPM:

npm i react-swipe-me

Usage

import SwipeMe from 'react-swipe-me'

const ExampleComponent = () => (
  <div className="application">
    <SwipeMe position="left" hide handle={20}>
      <div className="children"></div>
    </SwipeMe>
  </div>
);

SwipeMe component can get 3 different props:

nametypedefaultdescription
position"top" "bottom" "right" "left"bottomdefine side where component will be generated
handlenumber20define size of component that will be visible when the component is hidden
hidebooleanby this prop you can manually control state of the component

more in future...

Example: "padgy.pl" application login screen

License

MIT