---
# System prepended metadata

title: Touch events
tags: [zeta-dom]

---

---
tags: zeta-dom
---

# Touch events

### `longPress` event

### `gesture` event

```typescript
zeta.dom.on('gesture', (e) => {
    // one of the gesture, e.g. swipeLeft
    console.log(e.data);
});
```

Recognized gesture:

| Name         | Description |
| ------------ | ----------- |
| `swipeLeft`  | -           |
| `swipeRight` |             |
| `swipeUp`    | -           |
| `swipeDown`  | -           |
| `pinchZoom`  | -           |

In addition to `gesture` event, instead of putting lots of checking what gesture user is doing, all recognized gestures can be listened directly.

```typescript
zeta.dom.on('swipeLeft', () => {
    doSomethingWhenSwipeLeft();
});
```

### `dom.beginDrag`

### `dom.beginPinchZoom`
