# @vant/touch-emulator

> Vant touch emulator

Latest version **1.5.0** (published 2025-12-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vant/touch-emulator
pnpm add @vant/touch-emulator
yarn add @vant/touch-emulator
bun add @vant/touch-emulator
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.5.0 |
| Published | 2025-12-28 |
| First published | 2019-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 18.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24410 |
| Author | chenjiahan |
| Maintainers | chenjiahan |

## Links

- npm: https://www.npmjs.com/package/@vant/touch-emulator
- Repository: https://github.com/vant-ui/vant
- Homepage: https://github.com/vant-ui/vant#readme
- Issues: https://github.com/vant-ui/vant/issues
- npm.io page: https://npm.io/package/@vant/touch-emulator

## Recent versions

- 1.5.0 (latest) — 2025-12-28
- 0.0.1-beta.0 (beta) — 2019-05-28
- 1.4.0 — 2022-08-06
- 1.3.2 — 2021-07-08
- 1.3.1 — 2021-07-06
- 1.3.0 — 2021-05-26
- 1.2.0 — 2019-11-26
- 1.1.0 — 2019-07-03
- 1.0.0 — 2019-05-28

## README

# Vant Touch Emulator

在桌面端上模拟移动端 touch 事件，实现方式来自于 [hammerjs/touchemulator](https://github.com/hammerjs/touchemulator).

## Install

```shell
# with npm
npm i @vant/touch-emulator

# with yarn
yarn add @vant/touch-emulator

# with pnpm
pnpm add @vant/touch-emulator

# with Bun
bun add @vant/touch-emulator
```

## 使用指南

直接在代码中引入模块即可，模块会自动完成初始化并生效

```js
import '@vant/touch-emulator';
```

## CDN 引入

```html
<script src="https://fastly.jsdelivr.net/npm/@vant/touch-emulator"></script>
```

## 禁用 touch 模拟

在标签上添加 `data-no-touch-simulate` 属性后，可以使这个标签（以及它的子元素）不触发 `touch` 模拟事件。

```html
<div data-no-touch-simulate />
```

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