Skip to content

Pull to refresh

Expressive

Pull down at the top of a list or page to reload it, with a contained loading indicator that follows the pull.

import { PullToRefresh } from '@windmorph/react';

Playground

  • Alex
  • Sam
  • Priya
  • Zoë
  • Jonas
  • Mei
  • Omar
  • Lena

Code

import { PullToRefresh, List, ListItem } from '@windmorph/react'; <PullToRefresh  onRefresh={() => {}}  role="region"  aria-label="Messages"  tabIndex={0}  className="h-80 overflow-y-auto">  <List aria-label="Messages">    <ListItem>Alex</ListItem>    <ListItem>Sam</ListItem>  </List></PullToRefresh>

Examples

Pull down at the top of each area with a finger, or drag with a mouse, past the threshold and let go.

Basic: a promise drives the indicator

A list feed with refreshing controlled

A refresh button as well

Threshold, disabled and labels

Right to left