Upload
"idle"Ready to upload.
Async workflows
UploadStateIconShows the current state of a file upload.
Ready to upload.
"idle"Ready to upload.
"loading"animatedUploading is in progress.
"success"Upload complete successfully.
"error"The upload action failed.
Implementation
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.
import { UploadStateIcon } from "@stateglyph/react";
<UploadStateIcon state="idle" decorative />