Free and open-source React file upload components built for modern applications and websites. These file uploaders are built using React Aria and styled with Tailwind CSS.
chatgpt-clone.ts
commercial.mp4
invoice.pdf
SVG, PNG, JPG or GIF (max. 800x400px)
Example dashboard screenshot.jpg
720 KB
Uploading...
50%Tech design requirements_2.pdf
720 KB
Complete
100%Tech design requirements.pdf
1 MB
Failed
Installation
You can add this file upload component using our CLI or manually:
npx untitledui@latest add file-upload-base
File upload examples
Below are examples and variations of this file upload component:
chatgpt-clone.ts
commercial.mp4
invoice.pdf
SVG, PNG, JPG or GIF (max. 800x400px)
Example dashboard screenshot.jpg
720 KB
Uploading...
50%Tech design requirements_2.pdf
720 KB
Complete
100%Tech design requirements.pdf
1 MB
Failed
chatgpt-clone.ts
commercial.mp4
invoice.pdf
SVG, PNG, JPG or GIF (max. 800x400px)
Example dashboard screenshot.jpg
720 KB
50%
Tech design requirements_2.pdf
720 KB
100%
Tech design requirements.pdf
Upload failed, please try again
SVG, PNG, JPG or GIF (max. 800x400px)
Screenshot.png
IMG_0050.jpeg
invoice.pdf
Please upload PNG or JPEG images only.
smaller_file.jpg
too_large.mp4
still_too_large.pdf
Upload files to add to this project (max. 1 MB).
API reference
Import the parts and assemble them:
import { FileUpload } from "@/components/application/file-upload/file-upload-base"; <FileUpload.Root> <FileUpload.DropZone /> <FileUpload.List> <FileUpload.ListItemProgressBar /> </FileUpload.List> </FileUpload.Root>
Draggable
Import Draggable from @/components/application/file-upload/draggable. Renders a <div> element.
FileUpload.DropZone
Renders a <div> element.
FileUpload.List
Renders a <ul> element.
Also accepts all standard HTML attributes, all aria-* attributes, all standard React DOM event handlers.
FileUpload.ListItemProgressBar
Renders FileIcon.
FileUpload.ListItemProgressFill
Renders a <div> element.
FileUpload.Root
Renders a <div> element.
Also accepts all standard HTML attributes, all aria-* attributes, all standard React DOM event handlers.
FAQs
Please refer to our frequently asked questions page for more.
Pass the accept prop to FileUpload.DropZone. It takes the same comma-separated string as a native file input, for example "image/*", ".pdf,image/*" or "image/*,video/mpeg,application/pdf", and is checked for both dropped and picked files. Files that don't match go to onDropUnacceptedFiles instead of onDropFiles. Size is checked first, so a file that is both too big and the wrong type goes to onSizeLimitExceed.
Set maxSize on FileUpload.DropZone to the limit in bytes, for example maxSize={1024 * 1024 * 10} for 10 MB. Oversized files never reach onDropFiles; they go to onSizeLimitExceed. The hint text only switches to the error color when you pass that callback, and without it oversized files are dropped silently.
Yes. FileUpload.DropZone handles the native drag events itself and shows a brand-colored ring while a file is dragged over it. The "Click to upload" button opens the standard file picker for the same drop zone, and both paths run through the same type and size validation before calling onDropFiles with a FileList.
The list is fully controlled: keep the files in your own state and pass name, size (in bytes) and a progress number from 0 to 100 to each FileUpload.ListItemProgressBar or FileUpload.ListItemProgressFill. Update progress as your upload reports it. At 100, the progress bar item shows a "Complete" label and the fill item shows a check icon.
Set failed to true on the list item. Both list items then show an error ring and a "Try again" button that calls onRetry; ListItemProgressBar adds a "Failed" label and ListItemProgressFill shows "Upload failed, please try again". The delete button calls onDelete in every state.
Yes, set allowsMultiple={false} on FileUpload.DropZone. It defaults to true, and when disabled only the first file from a drop or selection is processed.
Use the hint prop, which replaces the default "SVG, PNG, JPG or GIF (max. 800x400px)" text — useful for describing your own accept and maxSize rules. To turn the whole drop zone off, pass isDisabled, which blocks drops, disables the file input, and dims the icon.