Data/File Uploader

FileUploader

Drag-and-drop file upload zone with file type validation, size limits, and preview thumbnails. Works with any upload backend.

import { FileUploader } from "@animui/ui"

Basic

Click or drag files into the drop zone.

Single file with custom label

Props

PropTypeDefaultDescription
onFiles(files: File[]) => voidCalled with accepted File objects when the user drops or selects files.
acceptstringComma-separated MIME types or extensions. e.g. 'image/*' or 'image/png,application/pdf'
maxSizenumberMaximum file size in bytes. Oversized files are rejected with an error message.
multiplebooleantrueAllow multiple file selection.
maxFilesnumberMaximum number of files that can be in the list at once.
valueUploadedFile[][]Controlled list of uploaded file objects (id, file, status, progress, preview).
onRemove(id: string) => voidCalled when the user clicks the remove button on a file.
labelstring"Drop files here or click to upload"Primary label shown inside the drop zone.
descriptionstringSecondary line of helper text. Auto-generated from accept/maxSize if omitted.
disabledbooleanfalseDisables the drop zone and file input.
classNamestringAdditional classes on the wrapper.
© 2026 Steal Shadow. MIT License.Report an issue