Skip to content

DropZone

DropZone(props): Element

Defined in: packages/ui/src/components/drop-zone.tsx:25

Drag-and-drop file upload area that integrates with @cfast/storage.

Accepts an upload result from useUpload() (@cfast/storage/client). File type restrictions and max size are inherited from the storage schema. Renders via the UI plugin’s dropZone slot and manages drag state, file validation, and upload progress internally.

DropZoneProps

See DropZoneProps.

Element

const upload = useUpload("postCoverImage");
<DropZone upload={upload} />
// Allow multiple files:
<DropZone upload={upload} multiple />