Need private packages and team management tools?Check out npm Teams »

swipe-dispatcher

0.3.0 • Public • Published

Swipe Dispatcher

Dispatch custom swipe events to DOM nodes.

Usage

import SwipeDispatcher from 'swipe-dispatcher';
 
new SwipeDispatcher( { /* options */ } );

Options

Option Default Description
root document.documentElement Event listeners get attached to this node
maxTime 333 The maximum time a swipe should take
minDistance 100 The minimum move distance
variance 100 The allowed horizontal/vertical variance
preventMove true Should preventDefault be called on touchmove

Install

npm i swipe-dispatcher

DownloadsWeekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

15.5 kB

Total Files

6

Last publish

Collaborators

  • avatar