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.
- DropZoneSlotProps for the underlying plugin slot.
- ImagePreviewProps for displaying uploaded images.
- FileListProps for displaying uploaded file lists.
Properties
Section titled “Properties”children?
Section titled “children?”
optionalchildren:ReactNode
Defined in: packages/ui/src/types.ts:1225
Custom content to display inside the drop zone.
multiple?
Section titled “multiple?”
optionalmultiple:boolean
Defined in: packages/ui/src/types.ts:1223
Whether to allow multiple file uploads.
upload
Section titled “upload”upload:
object
Defined in: packages/ui/src/types.ts:1204
Upload hook result from @cfast/storage/client.
accept
Section titled “accept”accept:
string
MIME type filter for accepted files.
error:
string|null
Upload error message, if any.
isUploading
Section titled “isUploading”isUploading:
boolean
Whether an upload is in progress.
progress
Section titled “progress”progress:
number
Current upload progress (0-100).
reset()
Section titled “reset()”reset: () =>
void
Reset the upload state.
Returns
Section titled “Returns”void
result
Section titled “result”result:
unknown|null
Upload result when complete.
start()
Section titled “start()”start: (
file) =>void
Start uploading a file.
Parameters
Section titled “Parameters”File
Returns
Section titled “Returns”void
validationError
Section titled “validationError”validationError:
string|null
Client-side validation error, if any.