---
title: Dropzone
label: Dropzone
order: 130
desc: Accept files through drag, drop, and paste interactions with Payload's Dropzone component.
keywords: ui, component, dropzone, upload, file, drag and drop
---

The `Dropzone` component adds drag, drop, and paste handling to a container. It passes the selected `FileList` to `onChange` and applies Payload's drop-target styles.

## Import

```tsx
import { Dropzone } from '@payloadcms/ui'
```

## Basic usage

<ComponentPreview component="Dropzone" example="basic" />

`Dropzone` does not render a file input or open the system file picker. Render those controls as children when users should be able to browse for files in addition to dropping them.

It also has no awareness of Collections or existing documents, so controls such as **Create New** and **Choose from existing** must come from the surrounding field interface.

When `multipleFiles` is disabled, dropping more than one file passes only the first file to `onChange`.

## Common props

These are the props most commonly used with this component. See its exported types in `@payloadcms/ui` for the complete list.

| Prop            | Type                        | Default     | Description                                        |
| --------------- | --------------------------- | ----------- | -------------------------------------------------- |
| `children`      | `ReactNode`                 | —           | Content and file-selection controls in the target. |
| `onChange` \*   | `(files: FileList) => void` | —           | Runs when files are dropped, pasted, or supplied.  |
| `multipleFiles` | `boolean`                   | `false`     | Allows more than one file to be returned.          |
| `disabled`      | `boolean`                   | `false`     | Disables drag, drop, and paste listeners.          |
| `dropzoneStyle` | `'default' \| 'none'`       | `'default'` | Enables or removes Payload's drop-target styles.   |
| `className`     | `string`                    | —           | Adds a class to the dropzone container.            |

_\* An asterisk denotes that a prop is required._
