Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Dropzone

Upload and review a collection of brand assets.

Preview

Live preview

Changes apply to this preview only.

Brand assets

SVG, PNG, JPG or WEBP. Drop up to 6 files, 8 MB each.

Brand kit empty

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Image previews

Dropped or selected images show a thumbnail from a local object URL; other files keep the document icon. showPreviews={false} opts out.

Open preview

Uncontrolled

defaultFiles seeds the list and the component keeps the next value itself.

Open preview

States

An external error marks the zone invalid; disabled keeps it visible but inert.

Open preview

Usage

Support file selection as well as dragging, and keep upload/network state in the application.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluDropzoneProps

Type source
PimoluDropzoneProps public API
NameTypeDefaultDescription
filesFile[] | undefined—Controlled list of files.
defaultFilesFile[] | undefinedan empty listInitial files when uncontrolled. Defaults to an empty list.
onFilesChange((files: File[]) => void) | undefined—Called with the complete next list after a drop or a removal.
acceptstring | undefined—Native accept string, for example `"image/*,.pdf"`. Used both by the file input and by the validation of dropped or selected files.
multipleboolean | undefinedtrueAllow more than one file. Defaults to true.
maxFilesnumber | undefined—Maximum number of files kept. Omit for no limit.
maxSizenumber | undefined—Maximum size of a single file, in bytes. Omit for no limit.
disabledboolean | undefinedfalseDisable the zone, the input and every remove button.
labelReactNode—Visible label.
descriptionReactNode—Supporting text below the label.
errorReactNode—Error text; also marks the control as invalid.
validateFilePimoluDropzoneValidator | undefined—Extra per-file validation, applied after accept and maxSize.
removeFileLabel((file: File) => string) | undefined`Remove <name>`Accessible name of a remove button. Defaults to `Remove <name>`.
showPreviewsboolean | undefinedtrueShow an image thumbnail for image files. Other files keep the document icon. Defaults to true.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLDivElement> | undefined—Standard React/HTML attribute.
files

File[] | undefined

No default extracted.

Controlled list of files.

defaultFiles

File[] | undefined

Default: an empty list

Initial files when uncontrolled. Defaults to an empty list.

onFilesChange

((files: File[]) => void) | undefined

No default extracted.

Called with the complete next list after a drop or a removal.

accept

string | undefined

No default extracted.

Native accept string, for example `"image/*,.pdf"`. Used both by the file input and by the validation of dropped or selected files.

multiple

boolean | undefined

Default: true

Allow more than one file. Defaults to true.

maxFiles

number | undefined

No default extracted.

Maximum number of files kept. Omit for no limit.

maxSize

number | undefined

No default extracted.

Maximum size of a single file, in bytes. Omit for no limit.

disabled

boolean | undefined

Default: false

Disable the zone, the input and every remove button.

label

ReactNode

No default extracted.

Visible label.

description

ReactNode

No default extracted.

Supporting text below the label.

error

ReactNode

No default extracted.

Error text; also marks the control as invalid.

validateFile

PimoluDropzoneValidator | undefined

No default extracted.

Extra per-file validation, applied after accept and maxSize.

removeFileLabel

((file: File) => string) | undefined

Default: `Remove <name>`

Accessible name of a remove button. Defaults to `Remove <name>`.

showPreviews

boolean | undefined

Default: true

Show an image thumbnail for image files. Other files keep the document icon. Defaults to true.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLDivElement> | undefined

No default extracted.

Standard React/HTML attribute.

Accessibility

  • Keyboard users need the same file-picker path and rejection information as pointer users.
Read the accessibility guide →