> For the complete documentation index, see [llms.txt](https://minwork.gitbook.io/long-press-hook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://minwork.gitbook.io/long-press-hook/advanced/options/callbacks/on-move.md).

# On move

#### Name

`onMove`

#### Type

{% code title="Javascript" %}

```javascript
(event, meta) => void
```

{% endcode %}

{% code title="TypeScript" %}

```typescript
(
  event: 
  | ReactMouseEvent<Target>
  | ReactTouchEvent<Target>
  | ReactPointerEvent<Target>,
  meta: { context?: Context; reason?: LongPressCallbackReason }
) => void
```

{% endcode %}

#### Default value

`undefined`

#### Description

Called when moving over element. Because long press [binder](/long-press-hook/advanced/hook-result-bind-function.md) will overwrite any movement handler, this callback is called when ANY movement occur (not necessarily after press). This way you can still call your regular movement handler using this callback.

All processing will happen only if element is pressed and [cancelOnMovement](/long-press-hook/advanced/options/cancellation/cancel-on-movement.md) option is enabled.

Since current position is extracted from event after this callback is called, you can potentially manipulate event position to model more complex behaviours.\
\
Position is extracted as follows:

```typescript
 // Touch event
 return {
  x: event.touches[0].pageX,
  y: event.touches[0].pageY,
 }
 
 // Mouse and pointer events
 return {
  x: event.pageX,
  y: event.pageY,
 }
```
