StealThis .dev

Pull-to-refresh

Pull a scroll surface down to reveal a refresh affordance, with a momentum-like release.

Open in Lab
html css javascript react
Targets: TS JS HTML React

Code

Pull-to-refresh

Pull a scroll surface down to reveal a refresh affordance, with a momentum-like release.

Support notes

The examples use Pointer Events, capture, bounded transforms, and small snap thresholds. Production code should also wire keyboard alternatives and reduced-motion preferences.

Included demo

  • Vanilla HTML, CSS, and JavaScript with zero external dependencies.
  • React equivalent using the same interaction model.
  • A Lab route for trying the behavior in isolation.

Integration checklist

Keep state updates separate from presentation, preserve semantic labels, and add persistence or server callbacks at the boundary where your product needs them.