# vue-clap

> vue.js directive for unified click and tap events handling

Latest version **1.0.2** (published 2016-04-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-clap
pnpm add vue-clap
yarn add vue-clap
bun add vue-clap
```

## 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.2 |
| Published | 2016-04-02 |
| First published | 2016-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Andrei Kashcha |
| Maintainers | anvaka |
| Keywords | vue, click, tap |

## Links

- npm: https://www.npmjs.com/package/vue-clap
- Repository: https://github.com/anvaka/vue-clap
- Homepage: https://github.com/anvaka/vue-clap#readme
- Issues: https://github.com/anvaka/vue-clap/issues
- npm.io page: https://npm.io/package/vue-clap

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 1.0.2 (latest) — 2016-04-02
- 1.0.1 — 2016-04-01
- 1.0.0 — 2016-04-01

## README

# vue-clap

vue-clap is a simple vue.js directive for unified click and tap events handling.
The main value proposition of this module is its size (~100 lines of code).

This works well for a simple case when all you need from a touch screen is a tap
event, and you don't want to load `hammer.js` into your bundle.

If you need more advanced touch screen support, then use [vue-touch](https://github.com/vuejs/vue-touch)

# usage

``` vue
<template>
<div>
  <!-- you can use v-clap instead of v-on:click -->
  <a href='#' v-clap='handleClickOrTap'>Click me</a>

  <!-- you can also use .prevent modifier to call event.preventDefault() -->
  <a href='#' v-clap.prevent='handleClickOrTap'>Click me and prvent default</a>
</div>
</template>
```
``` js
<script>
import Vue from 'vue'
import vueClap from 'vue-clap'

Vue.use(vueClap)

export default {
  methods: {
    handleClickOrTap(e) {
      console.log('Clicked or taped!', e)
    }
  }
}
</script>
```

# install

Grab it from npm:

```
npm install vue-clap
```

# license

MIT

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