> For the complete documentation index, see [llms.txt](https://docs.webtonative.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.webtonative.com/javascript-apis/pull-to-refresh-api.md).

# Pull To Refresh API

Lets users refresh the current page by pulling down on the screen — the standard native "swipe down to reload" gesture. It's enabled by default on every page and can be toggled at runtime from JavaScript. It can also be turned on/off and scoped to specific pages from the **WebToNative dashboard**, without any code changes.

> You'll need to import the javascript file in your website before starting from this [link](https://docs.webtonative.com/javascript-apis/getting-started).

***

## Enable / Disable

Enables or disables pull-to-refresh at runtime. Takes effect immediately on the current page.

{% tabs %}
{% tab title="Plain Javascript" %}

```javascript
window.WTN.enablePullToRefresh(true);
```

{% endtab %}

{% tab title="npm" %}

```javascript
import { enablePullToRefresh } from "webtonative";

enablePullToRefresh(true);
```

{% endtab %}
{% endtabs %}

**Parameters:**

| Key      | Type      | Required | Description                                          |
| -------- | --------- | -------- | ---------------------------------------------------- |
| `status` | `Boolean` | Yes      | `true` enables pull-to-refresh, `false` disables it. |

> **Does not persist across navigation:** This call sets a temporary, in-memory override for the current page. On the next page load, the app re-applies whatever is configured on the dashboard (see below) and may override what you just set. Call `enablePullToRefresh` again after each navigation if you need the override to stick.

***

## Scoping to Specific Pages (Dashboard)

Pull-to-refresh can also be turned on/off, or limited to specific pages, from the **WebToNative dashboard** — no code required. This is useful for disabling it on pages with their own internal scroll/refresh UI while keeping it enabled everywhere else.

***

**Notes:**

* Default state is enabled on all pages unless changed on the dashboard.
* The runtime JavaScript toggle and the dashboard setting are not independent — the dashboard setting takes over again on every page navigation, so treat `enablePullToRefresh` as a per-page override rather than a persistent setting.
* Feature was taken live on Android on May 17, 2023, and on iOS on August 12, 2026.
