Pull To Refresh
Mobile-style pull-down gesture at scroll-top that reveals an indicator (arrow then spinner) and dispatches a refresh event when released past the threshold.
Preview
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
height | string | — | Height of the scroll container in pixels (number) or any CSS length. |
refreshing | boolean | — | App-controlled busy state that keeps the spinner visible until removed. |
Installation
pura is copy-paste and dependency-free. Load the whole library, or just this component.
<link rel="stylesheet" href="/pura/tokens.css">
<script type="module" src="/pura/lib/pull-to-refresh.js"></script> import "./pura/lib/pull-to-refresh.js";