1.0.0 • Published 8 years ago

vue-touch2 v1.0.0

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

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

1.0.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago