Skip to content
PixiKit

Drop Zone

A file upload area with progress. Drag, click or paste files, watch each fill and finish, cancel or retry it, with clear reasons for rejected files.

pixikit.com/docs/app-ui/forms/drop-zone

Customize

Max size
Max files5
Multiple
Variant
Preview
Disabled

Props

14
NameTypeDefaultDescription
onUpload(file: File, report: (progress: number) => void, signal: AbortSignal) => Promise<void>NoneCalled once per file. Report progress from 0 to 100, stop when the signal aborts, throw to fail. Without it files are only collected.
valueDropFile[]NoneThe accepted files with their state, when you hold the list.
onValueChange(files: DropFile[]) => voidNoneCalled with the new list whenever a file is added, removed or changes state.
acceptstringNoneThe file types allowed, as in a file input's `accept`.
maxSizenumberNoneThe largest file in bytes.
maxFilesnumberNoneThe most files accepted.
multiplebooleantrueAllows more than one file.
variant"area" | "compact" | "avatar""area"`area` is a large drop area, `compact` a single row, `avatar` a round single-image picker.
titlestringNoneThe main line in the zone.
hintstringNoneA line under the title, such as the accepted types and size.
previewbooleanfalseShows image thumbnails.
disabledbooleanfalseTurns the zone off.
namestringNoneRenders a real file input with this name so the files go with a plain form.
classNamestringNone

Related