Skip to content

DropZoneProps

DropZoneProps = object

Defined in: packages/ui/src/types.ts:1202

Props for the DropZone component.

Integrates with useUpload() from @cfast/storage/client for drag-and-drop file uploads. Inherits accept and maxSize constraints from the storage schema. Manages drag state, file preview, validation errors, and upload progress internally.

optional children: ReactNode

Defined in: packages/ui/src/types.ts:1225

Custom content to display inside the drop zone.


optional multiple: boolean

Defined in: packages/ui/src/types.ts:1223

Whether to allow multiple file uploads.


upload: object

Defined in: packages/ui/src/types.ts:1204

Upload hook result from @cfast/storage/client.

accept: string

MIME type filter for accepted files.

error: string | null

Upload error message, if any.

isUploading: boolean

Whether an upload is in progress.

progress: number

Current upload progress (0-100).

reset: () => void

Reset the upload state.

void

result: unknown | null

Upload result when complete.

start: (file) => void

Start uploading a file.

File

void

validationError: string | null

Client-side validation error, if any.