Async workflows

Download

DownloadStateIcon

Shows the current state of a file download.

States

4 total

Download

Ready to download.

Download

"idle"

Ready to download.

Downloading

"loading"animated

Downloading is in progress.

Download complete

"success"

Download complete successfully.

Download failed

"error"

The download 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 · loading · success · error
example.tsx
import { DownloadStateIcon } from "@stateglyph/react";
<DownloadStateIcon state="idle" decorative />