@achuan/vue-touch

vue-touch for vue2

Usage no npm install needed!

<script type="module">
  import achuanVueTouch from 'https://cdn.skypack.dev/@achuan/vue-touch';
</script>

README

@achuan/vue-touch

Touch events plugin for Vue.js.

This is a directive wrapper for Hammer.js 2.0.8.

Install

yarn add @achuan/vue-touch

Usage

Register the directive

import Touch from '@achuan/vue-touch';
Vue.use(Touch)

Using the <v-touch> directive

<div v-touch-options="options" v-touch:swipeup="handler">
  hello, v-touch!
</div>

See Hammer.js documentation for all available events.

License

MIT