Docs / FileProcessing

FileProcessing

File upload and processing stage progress.

Install

npx shadcn@latest add https://crate.onerollstudios.com/r/file-processing.json

Playground

report.pdf

2.4 MB

40%
  1. Upload
  2. Reading
  3. Chunking
  4. Ready
<FileProcessing
  filename="report.pdf"
  size="2.4 MB"
  stage="reading"
  progress={40}
/>

Import

import { FileProcessing } from "@/components/agent-wait-states/file-processing";

Props

PropTypeRequiredDefaultNotes
classNamestringno
accentbooleannofalse
labelsPartial<CrateLabels>noReplace any of this component's labels. Overrides CrateProvider.
filenamestringno
sizestringno
stageFileStageno"uploading"
progressnumberno0

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.

LabelEnglish 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.