swipeout

1.0.0 • Public • Published

swipeout

Basic swipeable interaction helper

Usage

See the example folder for usage.

var swipeout = require('swipeout');

var destroy = swipeout(targetElement, function(type, event){

    type; -> 'drag' or 'rebound'

    event; -> {
        x: position x
        y: position y
        pause: function, pause momentum
        resume: function, resume momentum
        preventDefault: function, prevent default on the event.
    }

});

destroy; -> function, destroy the swipeout

Readme

Keywords

none

Package Sidebar

Install

npm i swipeout

Weekly Downloads

2

Version

1.0.0

License

ISC

Last publish

Collaborators

  • korynunn