> 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/long-press-cancelled.md).

# Long press cancelled

When released press before threshold time elapsed or conditionally triggered cancellation

#### Name

`onCancel`

#### 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 press is released BEFORE [threshold](/long-press-hook/advanced/options/configuration/long-press-threshold.md) time elapses, therefore before long press could occur.

This callback is usually called with *reason* inside *meta* param. For possible *reason* values see [here](/long-press-hook/advanced/options/callbacks.md#reason).
