npm

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

xwiper

2.2.0 • Public • Published

Xwiper

NPM

install size dependencies

Version License Downloads

Swipe handler, support all browser

Install

npm install xwiper --save

How to use

import Xwiper from 'xwiper';
 
const xwiper = new Xwiper('.slider');
 
xwiper.onSwipeLeft(() => console.log('swipe left'));
 
xwiper.onSwipeRight(() => console.log('swipe right'));
 
xwiper.onSwipeUp(() => console.log('swipe up'));
 
xwiper.onSwipeDown(() => console.log('swipe down'));
 
xwiper.onTap(() => console.log('tap'));
 
// Remove listener
xwiper.destroy();

Advance

You can use element instance

const slider = document.querySelector('.slider');
const xwiper = new Xwiper(slider);

Keywords

none

install

npm i xwiper

Downloadsweekly downloads

119

version

2.2.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability