Pull to Refresh, animated React component
A balance card you pull down to refresh: it rubber-bands and stretches while a ring draws itself, closes the ring past the line, holds while it spins, then springs back with a little overshoot as the digits roll and the chart redraws.
- Pro
- Loaders
- Spring
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Portfolio
$58,834.75
▲ $1,204.60 since last refresh
1H4H1D
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| initialBalance | number | 58834.75 | Balance shown before the first refresh. |
| onRefresh | (balance: number, delta: number) => void | undefined | Called each time a pull commits, with the new balance and the change. |
| autoplay | boolean | false | Pulls the card down and refreshes every 4.2 s, until someone drags it or uses the keyboard. |