PullToRefresh
An iOS/Android-style pull-down-to-refresh wrapper that fires a callback when the user drags past a configurable threshold.
Installation
dotnet add package Lumeo
One-time app setup (AddLumeo(), CSS & JS) is covered in the
installation guide.
Usage
@using Lumeo <PullToRefresh />
Tested
Tier 3 · A11y + behavior
all components → Render Behavior A11y Keyboard Scale E2E
20 tests across 6 files. Auto-generated from the test suite.
When to Use
- Mobile feeds, timelines, or lists where users expect to pull down to load fresh data
- Any scrollable panel that benefits from a gesture-driven reload instead of a visible refresh button
- News, social, or activity streams presented in a fixed-height container on touch devices
- Replacing manual "Reload" buttons with an intuitive gesture on hybrid mobile/desktop apps
- Content areas where polling is undesirable and user-triggered refresh is preferred
Pull down to refresh · Count: 0
Item 1
Item 2
Item 3
Item 4
Item 5
Threshold 50 px · Count: 0
Row 1
Row 2
Row 3
Row 4
Pull down to load newer items
Update #3
Update #2
Update #1
OnRefresh awaits real work — the spinner stays visible until the Task completes. Each pull prepends a freshly-loaded row to the top of the feed.
API Reference
PullToRefresh
| Prop | Type | Default | Description |
|---|---|---|---|
| ChildContent | RenderFragment? | — | The scrollable content wrapped by the pull-to-refresh gesture. The root element itself is the scroll container (overflow-y: auto). |
| ThresholdPx | double | 80 | Pull distance (in pixels, post rubber-band) required on release to trigger OnRefresh. Defaults to 80. |
| MaxPullPx | double | 120 | Maximum visual pull distance in pixels; the rubber-banded offset is clamped to this. Defaults to 120. |
| Class | string? | — | Additional CSS classes merged onto the root scroll-container element. |
| AdditionalAttributes | Dictionary<string, object>? | — | Unmatched attributes are splatted onto the root scroll-container element. |
Events
| OnRefresh | EventCallback | Invoked when the user releases a pull past ThresholdPx. The spinner stays locked visible until the returned task completes. |
Related Components
- SwipeActions — Reveal contextual actions by swiping a list row horizontally
- TouchRipple — Material-style touch feedback for tappable elements
- ScrollArea — Custom-styled scroll container for overflow content