Components/Form
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/dropzone
Dropzone lets users drag and drop files to upload them in a specified area.
<FileUpload/> instead.This component consists of 2 elements:
<Dropzone.Content/> to define the initial dropzone area's content.<Dropzone.Overlay/> to define what's shown to the user when a file is dragged into the dropzone.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.
| Name | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Accepts <Dropzone.Overlay /> or <Dropzone.Content />. Both of them can contain any required content. |
dataHook | string | — | 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. |
Import the driver matching your test environment:
| Method | Description |
|---|---|
getContentElement | Returns the content compound element inside the dropzone. |
getOverlayElement | Returns the overlay compound element inside the dropzone. |
dropFiles | fires a drop event with the given files. |
exists | Checks whether the component found with the given data hook. |
element | Gets the component root element. |
click | Clicks on the component root element. |
base | Returns UniDriver for the base element. |
Last updated: 22 October 2026