FileProcessing
File upload and processing stage progress.
Install
npx shadcn@latest add https://crate.onerollstudios.com/r/file-processing.jsonPlayground
report.pdf
2.4 MB
- Upload
- Reading
- Chunking
- Ready
<FileProcessing
filename="report.pdf"
size="2.4 MB"
stage="reading"
progress={40}
/>Import
import { FileProcessing } from "@/components/agent-wait-states/file-processing";Props
| Prop | Type | Required | Default | Notes |
|---|---|---|---|---|
className | string | no | ||
accent | boolean | no | false | |
labels | Partial<CrateLabels> | no | Replace any of this component's labels. Overrides CrateProvider. | |
filename | string | no | ||
size | string | no | ||
stage | FileStage | no | "uploading" | |
progress | number | no | 0 |
States
FileProcessing shows a different state for each value of stage:
stage:uploading,reading,chunking,ready
Labels
Override with the labels prop or a CrateProvider.
| Label | English default |
|---|---|
fileProgress | (percent, f) => `${f.number(percent)}%` |
fileUploading | "Upload" |
fileReading | "Reading" |
fileChunking | "Chunking" |
fileReady | "Ready" |
Types
export type FileStage = "uploading" | "reading" | "chunking" | "ready";Example
<FileProcessing filename="report.pdf" size="2.4 MB" stage="chunking" progress={72} accent />For coding agents: /llms/file-processing.md, generated from the same source.