Dropzone

Components/Form

Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/dropzone

Overview

Copy

Dropzone lets users drag and drop files to upload them in a specified area.

Do

  • Use it to upload files using drag and drop to a specified region.
  • Use it to upload single or multiple files.

Don't

  • Don't use it to upload files via the native file picker. Use <FileUpload/> instead.

Feature examples

Structure

This component consists of 2 elements:

  • Use <Dropzone.Content/> to define the initial dropzone area's content.
  • Use <Dropzone.Overlay/> to define what's shown to the user when a file is dragged into the dropzone.
Copy

Common use case examples

Add item

Use a dropzone to upload multiple items to a designated area.

Include a dropzone to let users drag and drop multiple files to upload. For example, adding photos to an album or importing data from a CSV file.

Copy

Code

Copy

Props

NameTypeDefaultDescription
childrenReactNode—Accepts <Dropzone.Overlay /> or <Dropzone.Content />. Both of them can contain any required content.
dataHookstring—Applies a data-hook HTML attribute that can be used in the tests.
onDrop (required)(files: File[]) => void—Defines an event handler which is called when files are dropped over the dropzone. Dropped files are supplied as an argument to the function.

Testkit

Import the driver matching your test environment:

Copy

Driver methods

MethodDescription
getContentElementReturns the content compound element inside the dropzone.
getOverlayElementReturns the overlay compound element inside the dropzone.
dropFilesfires a drop event with the given files.
existsChecks whether the component found with the given data hook.
elementGets the component root element.
clickClicks on the component root element.
baseReturns UniDriver for the base element.

Changelog

  • 1.340.0 (2026-10-21) — maintenance release, no component-specific changes
  • 1.339.0 (2026-10-19) — maintenance release, no component-specific changes
  • 1.338.0 (2026-10-15) — maintenance release, no component-specific changes
  • 1.325.0 (2026-09-17) — maintenance release, no component-specific changes
  • 1.320.0 (2026-09-03) — maintenance release, no component-specific changes
  • 1.310.0 (2026-08-10) — maintenance release, no component-specific changes
  • 1.292.0 (2026-06-22) — maintenance release, no component-specific changes
  • 1.266.0 (2026-04-07) — maintenance release, no component-specific changes
  • 1.260.0 (2026-03-17) — maintenance release, no component-specific changes
  • 1.187.1 (2025-05-08) — maintenance release, no component-specific changes
  • 1.138.1 (2024-10-30) — maintenance release, no component-specific changes
  • 1.115.0 (2024-07-17) — maintenance release, no component-specific changes
  • 1.104.1 (2024-05-14) — maintenance release, no component-specific changes
  • 1.92.1 (2024-02-05) — maintenance release, no component-specific changes

Last updated: 22 October 2026

Did this help?