---
title: "Refresh Button"
description: "Arrows that wind back, spin up into a breathing spinner arc, then coast to land upright and hand over to a check as Refresh morphs to Updated."
category: "Micro Interactions"
publishedAt: "2026-11-16"
updatedAt: "2026-11-25"
documentation: "https://beui.dev/micro-interactions/refresh-button"
markdown: "https://beui.dev/micro-interactions/refresh-button.md"
license: "MIT"
---

# Refresh Button

> Arrows that wind back, spin up into a breathing spinner arc, then coast to land upright and hand over to a check as Refresh morphs to Updated.

## Install

```bash
npx shadcn@latest add @beui/refresh-button
```

## Dependencies

- `clsx`
- `motion`
- `react`
- `tailwind-merge`

## Usage

```tsx
"use client";

import { RefreshButton } from "@/components/motion/refresh-button";

export function RefreshButtonUsage() {
  return (
    <RefreshButton
      onRefresh={async () => {
        // Replace with your refetch; the arrows spin until it settles.
        await new Promise((resolve) => setTimeout(resolve, 1200));
      }}
    />
  );
}
```

## API Reference

### RefreshButton

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `onRefresh` | `(() => unknown)` | — | No | Runs the refresh. Return a promise to keep spinning until it settles. |
| `labels` | `Partial<{ refresh: string; refreshing: string; updated: string; }>` | — | No | Override any built-in string, e.g. for translation. |
| `sound` | `boolean` | `false` | No | Play a tap on refresh and a crisp select once updated. Off by default; a `SoundProvider` can mute it app-wide. |
| `className` | `string` | — | No | Classes merged onto the root element. |

## About Refresh Button

Refresh Button is a React refresh control built with Framer Motion. Pressing it winds the arrows back a little, then they spin up from rest. While the refresh runs the arrowhead tucks away and the arc breathes long and short like a spinner. When it finishes the spin coasts to land upright instead of freezing mid-turn, the arc closes and the arrowhead clicks back in, and a check takes over as Refresh morphs to Refreshing and Updated with Text Morph. The spin runs on a single motion value, so it never jumps when the page re-renders.

### When to use it

- A feed, table or dashboard refetches its data on demand.
- A sync or status check runs from a toolbar.
- A preview rebuilds after a change.

### Accessibility

It renders a real button whose name follows its label and reports aria-busy while refreshing. With reduced motion the arrows stay still and the steps crossfade.

### FAQ

**How long does it spin?**

As long as the promise from onRefresh takes, and at least a second, so a fast refresh still reads. Then it eases out over one more turn.

**What happens on an error?**

Reject the promise and the button goes straight back to Refresh.

## Source

- Registry detail: https://beui.dev/r/refresh-button
- Raw source: https://beui.dev/r/refresh-button/raw
- GitHub: https://github.com/starc007/ui-components
