Rebar UI

1.0

opinion

PullToRefresh

Pull a list down to reload it.

InboxPull from the top, or press Refresh
Updated just now

Maya commented on Harbour homepage

2 min ago

MC

Jonas moved Offline sync for tasks to Review

10 min ago

JW

Leo exported the rota export

Yesterday

LS
Idle

Updated just now

Refreshing
Error

Could not refresh.

Empty

All clear

Nothing new since 9:41.

In context

Inbox on the phoneAt rest, and while updating
Inbox
Pull to refresh

Maya commented on Harbour homepage

2 min ago

MC

Jonas moved Offline sync for tasks to Review

10 min ago

JW

Leo exported the rota export

Yesterday

LS
Inbox
Updating

Maya commented on Harbour homepage

2 min ago

MC

Jonas moved Offline sync for tasks to Review

10 min ago

JW

Leo exported the rota export

Yesterday

LS

Props

PropTypeRequiredDefault
onRefresh() => void | Promise<void>Yes—
thresholdnumber | undefinedNo60
refreshingboolean | undefinedNo—

Accessibility

The pull only starts when the content is genuinely at scrollTop === 0 when the drag begins, so pulling on scrolled content just scrolls. A small, always-visible Refresh button sits in the corner and fires the same onRefresh, so a mouse or keyboard user has a real way in.

data-rebar-* attributes

data-rebar-component="pull-to-refresh"; parts: indicator, scroll-container, refresh-button.

Migrating to Ant Design

AntD has no direct equivalent. antd-mobile's PullToRefresh is the closer sibling library if the migration target is genuinely mobile.