DropZone
An input that allows for drag and dropping files.
Importing
1
import { DropZone } from '@infinityfx/fluid';Usage
Accepted types
API reference
DropZone Props
loading?
boolean
false
Shows a loading spinner while true.
error?
any
Marks the drop zone as invalid when truthy.
text?
string
"Drop files or click to browse"
Instruction text shown in the empty state.
annotation?
string
Additional annotation text shown below the main text.
icon?
React.ReactNode
Custom icon shown in the empty state.
previewImages?
boolean
false
Shows a preview when an image file is selected.
fallbackPreviewImage?
string
Fallback image URL to show when no file is selected but previewImages is enabled.
inputRef?
React.Ref<HTMLInputElement>
Ref forwarded to the underlying file input element.
onChange?
React.ChangeEventHandler<HTMLInputElement>
disabled?
boolean
false