vue-touch2

1.0.0 • Public • Published

vue-touch2

Alternate Touch events plugin for Vue.js

This is a directive wrapper for Tocca.js. This is an alternative to vue-touch which uses Hammer.js.

Install

CommonJS

  • Available through npm as vue-touch2.

    var VueTouch2 = require( 'vue-touch2' );
    Vue.use( VueTouch2 );

Direct include

  • You can also directly include it with a <script> tag when you have Vue and Tocca.js already included globally. It will automatically install itself, and will add a global VueTouch2.

Usage

Using the v-touch directive

<a v-touch:tap="onTap">Tap me!</a>

<div v-touch:swipeleft="onSwipeLeft">Swipe me!</div>

The supported touch events are: tap, dbltap, longtap, swipeleft, swiperight, swipeup, swipedown

See /example for a multi-event demo. To build it, run npm install && npm run build.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i vue-touch2

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • gilesa