Installation
npx shadcn@latest add @iconiq/file-uploadProps
FileUpload
Drag-and-drop uploader with an internal queue, hidden file input, keyboard-triggerable drop zone, and callback hooks for parent integrations.
acceptstringmultiplebooleanDefault true
maxFilesnumberdisabledbooleanDefault false
namestringclassNamestringonFilesChange(files: File[]) => voidonFileRemove(file: File, nextFiles: File[]) => voidonUploadComplete(files: File[]) => voidThe drop zone is keyboard accessible and opens the hidden file input on Enter or Space.
Both drag-and-drop and click-to-browse flow through the same queue logic, so accept filtering and max file limits stay consistent.
Built-in behavior
The component still owns its progress visuals and preview lifecycle, even when you attach callbacks from parent code.
progress statebuilt-inimage previewsbuilt-inremove actionbuilt-inPreview object URLs are cleaned up on remove and during component unmount.
Each queue item id is built from the file name, file size, and a random suffix to reduce collisions between repeated uploads.
Registry bundle
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: motion, lucide-react.