Workspace
DropZone
A drop target that reports files and offers a picker
Drop files here
or pick them from the platform
Nothing dropped yet
Usage
import { DropZone } from "@gpuixui/media";
<DropZone
label="Drop files here"
description="or pick them from the platform"
onDrop={({ files }) => addFiles(files.map((file) => file.path))}
onPick={() => renderer.promptForPaths({ allowMultiple: true })}
/>;API
| Prop | Type | Default |
|---|---|---|
label | string (required) | "Drop files" (a blank label reads as the default) |
onDrop | (payload: DropPayload) => void (required) | — |
description | string | — |
onPick | () => void | — |
pickLabel | string | "Choose files" (a blank label reads as the default) |
disabled | boolean | false |
className | string | — |
Edit this page on GitHubpackages/media/docs/drop-zone.mdx