1.1.4 • Published 5 years ago

ui-react.swipe v1.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

(UI-React) Swipe

npm Travis npm npm version

Installing as a package

npm i ui-react.swipe -S or npm install ui-react.swipe --save

Demo

http://ui-react.github.io/ui-react.swipe

Development

  1. git clone git@github.com:ui-react/ui-react.swipe.git or git clone https://github.com/ui-react/ui-react.swipe.git
  2. npm i or npm install
  3. Building npm run build, Watching npm run watch

Getting started

import React, { Component } from 'react';
import { render } from 'react-dom';
import Swipe from 'ui-react.swipe';

class MyApp extends Component {

    onSwipeStart = () => {
        console.info('Swipe START!');
    }

    onSwipeLeft = () => {
        console.info('Swipe LEFT!');
    }

    render() {
        return(
            <Swipe tagName="ul" axis="x" onSwipeStart={this.onSwipeStart} onSwipeLeft={this.onSwipeLeft}>
                <li>My swipe block</li>
            </Swipe>
        )
    }

}

render(<MyApp />, document.getElementById('my-app'));

Properties

  • (String) tagName default: 'div'
  • (String) className
  • (Object) style
  • (String) axis
  • (Number) minDelta
  • (Function) onSwipeStart
  • (Function) onSwipeMove
  • (Function) onSwipeEnd
  • (Function) onSwipeUp
  • (Function) onSwipeDown
  • (Function) onSwipeLeft
  • (Function) onSwipeRight
1.1.4

5 years ago

1.1.2

5 years ago

1.1.0

6 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago