> For the complete documentation index, see [llms.txt](https://bubble.digital-bird.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bubble.digital-bird.com/plugins/page-close-event.md).

# Page Close Event 🚪

## 🔗 Links

> [Demo](https://de-demo2.bubbleapps.io/version-test/quit-event) | [Editor](https://bubble.io/page?type=page\&name=quit-event\&id=de-demo2\&tab=tabs-1)

> [Plugin page](https://bubble.io/plugin/page-close-event--quit--exit-1621764699423x344379196288794600)

> [Forum](https://forum.bubble.io/t/free-plugin-page-close-event/152585)

## 🔥 Features

* Very easy configuration
* Work on mobile and desktop
* Event sensitivity configuration

## 📚 Documentation

### ➡️ Quick Start

1. Add the **Page Close Event** element on the page:

![](/files/-MaNv_0BZrQwxqjUu9Au)

2\. Use the "**Page Close**" event in your Workflow to show a popup or make any other action:

![](/files/-MaNven18OW5yRyrAZVi)

### ➡️ Element Fields

| Field       | Type     | Description                                                                                                                                                                                                                                                                                                                                                                       |
| ----------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Method      | Dropdown | <p></p><p>The bounce detection method. Default: auto.</p><ul><li>mouse: For desktop browsers. Detects bounces based on the mouse's direction, velocity and distance from the top of the page.</li><li>history: For mobile browsers. Triggers when the visitor clicks on the browser's back button.</li><li>auto: Automatically picks a method based on the device type.</li></ul> |
| Distance    | Integer  | The minimum distance in pixels from the top of the page to consider triggering for. Default: 100                                                                                                                                                                                                                                                                                  |
| Sensitivity | Integer  | The minimum distance the mouse has to have moved in the last 10 mouse events for onBounce to be triggered. Default: 10                                                                                                                                                                                                                                                            |
