A drag-and-drop file upload area with file type filtering, size limits, and file list preview.
Import the DropZone component and access all parts using dot notation.
import {DropZone} from "@heroui-pro/react";
<DropZone>
<DropZone.Area>
<DropZone.Icon />
<DropZone.Label>Drag files here or click to browse</DropZone.Label>
<DropZone.Description>PDF, DOCX, PNG, or JPG up to 10 MB.</DropZone.Description>
<DropZone.Trigger>Select files</DropZone.Trigger>
</DropZone.Area>
<DropZone.Input />
<DropZone.FileList>
<DropZone.FileItem>
<DropZone.FileFormatIcon />
<DropZone.FileInfo>
<DropZone.FileName>Proposal.pdf</DropZone.FileName>
<DropZone.FileMeta>2.4 MB</DropZone.FileMeta>
</DropZone.FileInfo>
<DropZone.FileProgress>
<DropZone.FileProgressTrack>
<DropZone.FileProgressFill />
</DropZone.FileProgressTrack>
</DropZone.FileProgress>
<DropZone.FileRetryTrigger />
<DropZone.FileRemoveTrigger />
</DropZone.FileItem>
</DropZone.FileList>
</DropZone>;.drop-zone - Root wrapper.drop-zone__area - The droppable area (RAC DropZone).drop-zone__icon - Upload icon container.drop-zone__label - Primary label text.drop-zone__description - Secondary description text.drop-zone__trigger - Browse button.drop-zone__input - Hidden file input.drop-zone__file-list - File list container with animation.drop-zone__file-item - Individual file entry.drop-zone__file-format-icon - File type SVG icon with colored badge.drop-zone__file-info - File name and metadata container.drop-zone__file-name - File name text.drop-zone__file-meta - File size/status metadata.drop-zone__file-progress - Upload progress bar.drop-zone__file-retry-trigger - Retry button for failed uploads.drop-zone__file-remove-trigger - Remove/close button[data-drop-target="true"] on .drop-zone__area (accent border and background)[data-focus-visible="true"] on .drop-zone__area (focus ring)[data-disabled="true"] on .drop-zone__area (reduced opacity)[data-status="uploading|complete|failed"] on .drop-zone__file-itemThe root wrapper component. Provides file picker context.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Area, FileList, and other sub-components |
className | string | - | Additional CSS class |
render | DOMRenderFunction | - | Custom render function to override the default div element |
Also supports all native div HTML attributes.
The droppable area. Wraps RAC DropZone.
Also supports all RAC DropZone props (onDrop, getDropOperation, isDisabled, etc.).
Upload icon container. Renders a default cloud upload icon when no children are provided.
Primary label text. Wraps RAC Text with slot="label".
Secondary description text.
Hidden file input for the browse trigger.
| Prop | Type | Default | Description |
|---|---|---|---|
accept | string | - | Accepted file types (e.g. "image/*,.pdf") |
multiple | boolean | - | Whether multiple files can be selected |
onSelect | (files: FileList) => void | - | Called when files are selected via the file picker |
Browse button that opens the file picker. Wraps RAC Button. Provide visible button text, for example <DropZone.Trigger>Select files</DropZone.Trigger>. When no children are provided, it renders Select files.
Animated file list container using Motion AnimatePresence.
Individual file entry with Motion layout animations.
| Prop | Type | Default | Description |
|---|---|---|---|
status | 'uploading' | 'complete' | 'failed' | - | Upload status of this file item |
File type SVG icon with a colored format badge.
| Prop | Type | Default | Description |
|---|---|---|---|
format | string | - | File format label (e.g. "PDF", "JPG") |
color | string | 'gray' | Badge color |
Container for file name and metadata.
File name text display.
File size/status metadata text.
Upload progress bar. Wraps HeroUI ProgressBar.
| Prop | Type | Default | Description |
|---|---|---|---|
size | string | 'sm' | Progress bar size |
Also supports all HeroUI ProgressBar props.
Progress bar track. Wraps HeroUI ProgressBar.Track.
Progress bar fill. Wraps HeroUI ProgressBar.Fill.
Retry button for failed uploads. Wraps RAC Button.
Remove/close button. Wraps RAC Button.