Skip to content

DropZone

DropZone provides a drag-and-drop target and file-picker button for adding video files. It reads canAddMore from UploadProvider context and disables itself automatically when the file limit is reached.

Drop videos here or browse
MP4, WebM, MOV — up to 500 MB
import { DropZone } from "@hyperserve/upload-react";
<DropZone supportingText="MP4, WebM, MOV, up to 500 MB" />
PropTypeDefaultDescription
acceptstring"video/*"MIME type filter for the file input
multiplebooleantrueAllow multiple files
disabledbooleanfalseDisable the drop zone (also disables when canAddMore is false)
supportingTextReactNodenoneHelp text below the main label
styleCSSPropertiesnoneBase styles
activeStyleCSSPropertiesnoneMerged during drag hover
classNamestringnoneBase class
activeClassNamestringnoneAppended during drag hover
childrenReactNode | ((state: DropZoneRenderProps) => ReactNode)noneCustom content or render function

For full control over the drop zone content:

Custom drop zone UI
<DropZone>
{({ isDragging, openPicker }) => (
<div>
{isDragging ? "Release to upload" : "Custom drop zone UI"}
<button onClick={openPicker}>Select Files</button>
</div>
)}
</DropZone>
import type { DropZoneRenderProps } from "@hyperserve/upload-react";
type DropZoneRenderProps = {
isDragging: boolean;
openPicker: () => void;
};

The default drop zone uses inline styles from the shared theme. Override with style/className or use the render function for complete control.