An icon button that spins on click and supports async refresh callbacks. Perfect for reloading component previews or any live data widget.
Made by LéoInstallation
Usage
Async refresh
The button disables itself and spins continuously while the promise is pending:
Controlled
API
| Prop | Type | Default | Description |
|---|---|---|---|
onRefresh | () => void | Promise<void> | — | Callback fired on click. Async promises are awaited. |
isRefreshing | boolean | — | Controlled refreshing state (disables button). |
variant | "default" | "ghost" | "outline" | "secondary" | "ghost" | Visual variant. |
size | "sm" | "default" | "lg" | "default" | Button size. |