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

# Press finished

#### Name

`onFinish`

#### 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 on the element is released, which is **always** AFTER [threshold](/long-press-hook/advanced/options/configuration/long-press-threshold.md) time elapses, therefore after long press occurs and [callback](/long-press-hook/advanced/callback.md) is called.

This callback is mutually exclusive with [onCancel](/long-press-hook/advanced/options/callbacks/long-press-cancelled.md) callback, which means it won't be called if long press was cancelled before being triggered.

{% hint style="info" %}
In cases when you want to trigger action only after user releases *long press* instead of instantly after [threshold](/long-press-hook/advanced/options/configuration/long-press-threshold.md) time elapses, use this callback instead of [long press callback](/long-press-hook/advanced/callback.md)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://minwork.gitbook.io/long-press-hook/advanced/options/callbacks/press-finished.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
