# any-touch

> 一个小巧的手势库

Latest version **2.2.0** (published 2022-05-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install any-touch
pnpm add any-touch
yarn add any-touch
bun add any-touch
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2022-05-24 |
| First published | 2018-10-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 10 |
| Unpacked size | 142.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1242 |
| Author | any86 |
| Maintainers | russell-ne |
| Keywords | touch, mouse, gesture |

## Links

- npm: https://www.npmjs.com/package/any-touch
- Repository: https://github.com/any86/any-touch
- Homepage: https://github.com/any86/any-touch#readme
- Issues: https://github.com/any86/any-touch/issues
- npm.io page: https://npm.io/package/any-touch

## Dependencies (10)

- [tslib](https://npm.io/package/tslib.md) ^2.3.1
- [any-event](https://npm.io/package/any-event.md) ^2.2.0
- [@any-touch/pan](https://npm.io/package/@any-touch/pan.md) ^2.2.0
- [@any-touch/tap](https://npm.io/package/@any-touch/tap.md) ^2.2.0
- [@any-touch/core](https://npm.io/package/@any-touch/core.md) ^2.2.0
- [@any-touch/pinch](https://npm.io/package/@any-touch/pinch.md) ^2.2.0
- [@any-touch/press](https://npm.io/package/@any-touch/press.md) ^2.2.0
- [@any-touch/swipe](https://npm.io/package/@any-touch/swipe.md) ^2.2.0
- [@any-touch/rotate](https://npm.io/package/@any-touch/rotate.md) ^2.2.0
- [@any-touch/doubletap](https://npm.io/package/@any-touch/doubletap.md) ^2.2.0

## Recent versions

- 2.2.0 (latest) — 2022-05-24
- 2.0.3-alpha.0 (next) — 2022-01-18
- 0.5.2 (lastest) — 2019-12-05
- 2.1.3 — 2022-05-24
- 2.1.2 — 2022-04-28
- 2.1.1 — 2022-04-08
- 2.1.0 — 2022-04-02
- 2.0.3 — 2022-03-30
- 2.0.3-2.0.3-alpha.1.0 — 2022-03-30
- 2.0.2 — 2022-01-06
- 2.0.2-alpha.1 — 2022-01-06
- 2.0.2-alpha.0 — 2022-01-06
- 2.0.1 — 2021-12-29
- 2.0.1-alpha.0 — 2021-12-28
- 2.0.0 — 2021-12-28
- … 134 more at https://npm.io/package/any-touch/versions

## README

# any-touch [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![size-image]][size-url] [![codecov](https://codecov.io/gh/any86/any-touch/branch/master/graph/badge.svg)](https://codecov.io/gh/any86/any-touch) [![CircleCI](https://circleci.com/gh/any86/any-touch.svg?style=svg)](https://circleci.com/gh/any86/any-touch)

[size-image]: https://badgen.net/bundlephobia/minzip/@any-touch/core
[size-url]: https://bundlephobia.com/result?p=@any-touch/core
[npm-image]: https://badgen.net/npm/v/any-touch
[npm-url]: https://npmjs.org/package/any-touch
[downloads-image]: https://badgen.net/npm/dt/any-touch
[downloads-url]: https://npmjs.org/package/any-touch

![6类手势](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/102a244991064824900ac45efeb9251d~tplv-k3u1fbpfcp-zoom-1.image)


-   支持 PC 端 / 移动端 / 微信小程序.
-   默认加载**6 个手势**, 也可按需加载手势, 核心**1kb**, 完整**4kb**.
-   **无依赖, 不限于 Vue / React / Angular等...**

## 演示

<details>
<summary>查看二维码</summary>
<img src="https://user-images.githubusercontent.com/8264787/104836031-a55ca780-58e5-11eb-936a-7e2d1a05ee86.png" />
</details>

[直接访问](https://any86.github.io/any-touch)


## 安装

```javascript
npm i -S any-touch
```

## CDN

```html
<script src="https://unpkg.com/any-touch/dist/any-touch.umd.min.js"></script>
<script>
    console.log(AnyTouch.version); // 2.x.x
</script>
```

## 快速开始

```javascript
import AnyTouch from 'any-touch';

const el = document.getElementById('box');
const at = new AnyTouch(el);

// e包含位移/速度/方向等信息
at.on('pan', (e) => console.log(e));
```

[🚀 更多文档](https://github.com/any86/any-touch#any-touch-----)

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