# @vue-mixin/touch

> touch mixin for vue

Latest version **1.0.1** (published 2020-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vue-mixin/touch
pnpm add @vue-mixin/touch
yarn add @vue-mixin/touch
bun add @vue-mixin/touch
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-06-01 |
| First published | 2020-06-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | AmirRezaDalir |
| Maintainers | dalirnet |
| Keywords | vue, vuejs, mixin, touch, swipe, gestures |

## Links

- npm: https://www.npmjs.com/package/@vue-mixin/touch
- Repository: https://github.com/dalirnet/vue-mixin
- Homepage: https://github.com/dalirnet/vue-mixin#readme
- Issues: https://github.com/dalirnet/vue-mixin/issues
- npm.io page: https://npm.io/package/@vue-mixin/touch

## Alternatives

- [adhdev](https://npm.io/package/adhdev.md) — 11.1K weekly downloads
- [react-slide-button](https://npm.io/package/react-slide-button.md) — 310 weekly downloads
- [better](https://npm.io/package/better.md) — 42 weekly downloads
- [react-native-swipe-image](https://npm.io/package/react-native-swipe-image.md) — 22 weekly downloads
- [nl.fokkezb.pulltorefresh](https://npm.io/package/nl.fokkezb.pulltorefresh.md) — 11 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-06-01
- 1.0.0 — 2020-06-01

## README

# @vue-mixin/touch

Touch mixin for vue
[Demo](https://dalirnet.github.io/vue-mixin/touch/)

---

##### Install

```bash
npm install @vue-mixin/touch --save
```

##### Import

```javascript
import touchMixin from "@vue-mixin/touch"

export default {
    mixins: [touchMixin],
}
```

---

##### Swipe

-   template

```html
<div ref="touchSwipe"></div>
```

-   script

```javascript
export default {
    methods: {
        /* ↑ */
        touchSwipeToUp() {
            console.log("Up")
        },

        /* ← */
        touchSwipeToLeft() {
            console.log("Left")
        },

        /* → */
        touchSwipeToRight() {
            console.log("Right")
        },

        /* ↓ */
        touchSwipeToDown() {
            console.log("Down")
        },
    },
}
```

---

##### Tap

-   template

```html
<div ref="touchTap"></div>
```

-   script

```javascript
export default {
    methods: {
        /* doesn't fire on click */
        touchTap() {
            console.log("Tap")
        },
    },
}
```

---
_Source: https://npm.io/package/@vue-mixin/touch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
