042
Drop files in and each one fans out into its own card with a coloured type badge, live progress and time left, while a failed upload waits patiently for a retry.
akadropzone·file upload
Run this in any project set up for the shadcn CLI. It copies the Upload Tray source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/upload-tray.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { UploadTray } from "@/components/upload-tray";
export default function Page() {
return <UploadTray />;
}A free React component in the Forms collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Upload Tray source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| initialFiles | UploadTrayFile[] | [] |
| shouldFail | (file: UploadTrayFile, attempt: number) => boolean | () => false |
| onFiles | (files: File[]) => void | — |
| accept | string | — |
| hint | string | "PDF, images, video or archives · up to 50 MB" |
| className | string | — |