Calm motion: animations on this site only fade, with no movement
PullToRefresh
Drag down to reload
Pull down at the top of a list to reload it, the way phone apps do. It only works by touch, so also give a visible refresh button for everyone else.
Basic
- 第1話
- 第2話
- 第3話
- 第4話
- 第5話
- 第6話
Or drag down from the top of the list; past 64px the arrow flips — release to refresh.
@refreshgets adonecallback. Call it when the reload is finished. "Refreshing" (labels.refreshing) is announced meanwhile.thresholdis how far to pull.scrollTargetis the container whose top counts, when it is not the wrapper.
Usage
ts
import { BlessPullToRefresh } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
threshold | number | 64 | px of pull that triggers a refresh |
max | number | 96 | max visual travel |
disabled | boolean | — | |
scrollTarget | HTMLElement | null | — | scroll container to check; default = the wrapper itself, falling back to window |
labels | Partial<{ refreshing: string; }> | — |
Events
| Name | Payload | Description |
|---|---|---|
refresh | [done: () => void] |
Slots
| Name | Scope | Description |
|---|---|---|
indicator | { ready: boolean; busy: boolean; pull: number; } | |
default | — |