# @antv/g-plugin-gesture

> A G plugin for Gesture implemented with PointerEvents

Latest version **2.1.3** (published 2026-10-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @antv/g-plugin-gesture
pnpm add @antv/g-plugin-gesture
yarn add @antv/g-plugin-gesture
bun add @antv/g-plugin-gesture
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.1.3 |
| Published | 2026-10-16 |
| First published | 2023-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 158.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1215 |
| Author | https://github.com/orgs/antvis/people |
| Maintainers | lvisei, iaaron, jinke.li, lzxue, army8735, dengfuping, afc163, chenluli, kn9117, bbsqq, banxuan, yanxiong, atool, pearl_wang, interstellarmt, alex_zjt, duxinyue023, wang1212, gaofuhong |
| Keywords | antv, g |

## Links

- npm: https://www.npmjs.com/package/@antv/g-plugin-gesture
- Repository: https://github.com/antvis/g
- Homepage: https://github.com/antvis/g#readme
- Issues: https://github.com/antvis/g/issues
- npm.io page: https://npm.io/package/@antv/g-plugin-gesture

## Dependencies (3)

- [tslib](https://npm.io/package/tslib.md) ^2.5.3
- [@antv/g-lite](https://npm.io/package/@antv/g-lite.md) 2.7.2
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.25.6

## Recent versions

- 2.1.3 (latest) — 2026-10-16
- 2.0.39-beta.0 (beta) — 2025-12-15
- 2.0.11-alpha.0 (alpha) — 2024-10-21
- 2.0.10 (next) — 2024-09-29
- 2.1.2 — 2026-10-10
- 2.1.1 — 2025-12-24
- 2.1.0 — 2025-12-22
- 2.0.42 — 2025-12-12
- 2.0.41 — 2025-12-10
- 2.0.40 — 2025-10-13
- 2.0.39 — 2025-10-13
- 2.0.38 — 2025-07-30
- 2.0.37 — 2025-07-18
- 2.0.36 — 2025-06-27
- 2.0.35 — 2025-05-09
- … 70 more at https://npm.io/package/@antv/g-plugin-gesture/versions

## README

# @antv/g-plugin-gesture

## Getting Started

Create and register plugin in renderer.

```js
import { Renderer } from '@antv/g-canvas';
import { Plugin } from '@antv/g-plugin-gesture';

const plugin = new Plugin();
const renderer = new Renderer();
renderer.registerPlugin(plugin);
```

Enable gesture with `gestureEnabled` in style.

```js
const circle = new Circle({
    style: {
        cx: 200,
        cy: 200,
        r: 100,
        fill: 'blue',
        gestureEnabled: true,
    },
});
```

Then we can listen gesture event such as `press` on plugin:

```js
canvas.addEventListener('press', (e) => {
    console.log(e.target);
});
```

---
_Source: https://npm.io/package/@antv/g-plugin-gesture · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
