Skip to content
IndexRequest a UIAboutContact

Pull to Refresh

Drag a list downward to reveal a refresh indicator, release past the threshold to reload.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Create a 300x260px feed card with a header strip containing a refresh indicator (circular arrow icon plus status text) hidden above the list, a refresh button in the card corner, and a list of four items. Use pointer events on the list with touch-action none: when the pointer moves downward from a press, translate the list by half the drag distance up to a maximum of 90px and rotate the arrow icon proportionally; at 60px or more change the status to "Release to refresh" and flip the arrow. On release past 60px keep the list at 48px, show a spinner with the text "Refreshing…" for 1.2 seconds, then insert a new item "Just now" at the top and spring back to 0 in 280ms cubic-bezier(.2,.7,.2,1). Releasing earlier springs back without refreshing. The refresh button runs the same sequence. Set aria-busy on the list while refreshing. Under prefers-reduced-motion drop rotations and show only text.

About this pattern

Definition

A gesture at the top of a list: pulling it down reveals an indicator that grows with the pull, and releasing beyond a threshold starts a refresh.

Purpose & UX principles

  • Familiar way to fetch new content on mobile feeds.
  • The indicator tells people how far to pull and when releasing will work.
  • Always offer a visible Refresh button as well, since the gesture is invisible to many users.

Interaction states

  • Idle, pulling (arrow rotates), ready (arrow flips), refreshing (spinner, list locked), done.

Motion specification

  • Pull follows the pointer with 50% damping; release springs back in 280ms cubic-bezier(.2,.7,.2,1).
  • The refreshing spinner rotates at 700ms per turn.
  • Reduced motion: no rotation, text status ("Refreshing…") instead.

Responsive behaviour

  • Works with touch and mouse drag; the pull distance is damped so it never exceeds 90px.
  • The refresh button is always shown for keyboard and assistive technology.

Code

HTML
<div class="card">
  <div class="ind" id="ind"><span class="ic" id="ic">↓</span><span id="txt">Pull to refresh</span></div>
  <button class="rb" id="rb" type="button">Refresh</button>
  <ul class="feed" id="feed"><li>Maya liked your post</li><li>New comment on Studio</li><li>Jon shared a file</li><li>Backup completed</li></ul>
</div>

Related patterns

Spinner

↗
SpinnerLoading & Progress

Swipe to Delete

↗
Swipe to DeleteGestures & Touch

Skeleton Loading

↗
Skeleton LoadingLoading & Progress