Async workflows

Refresh

RefreshStateIcon

Shows the progress and result of refreshing content.

States

4 total

Refresh

Ready to refresh.

Refresh

"idle"

Ready to refresh.

Refreshing

"refreshing"animated

Refreshing is in progress.

Refresh complete

"complete"

Refresh complete successfully.

Refresh failed

"error"

The refresh action failed.

Implementation

Pass your current state.

The component stays presentational. Your application remains in control of async work and business logic. The state prop is a TypeScript string literal union — pass an invalid state and you'll get a type error at build time.

Source
Lucide
License
ISC
States
idle · refreshing · complete · error
example.tsx
import { RefreshStateIcon } from "@stateglyph/react";
<RefreshStateIcon state="idle" decorative />