A drop zone is an area into which one or multiple objects can be dragged and dropped.
Drag and drop your file
API
<DropZone>
<IllustratedMessage />
</DropZone>
DropZone
| Name | Type | Default |
|---|---|---|
styles | StylesPropWithHeight | Default: — |
Spectrum-defined styles, returned by the | ||
children | ReactNode | Default: — |
The content to display in the drop zone. | ||
isFilled | boolean | Default: — |
Whether the drop zone has been filled. | ||
replaceMessage | string | Default: 'Drop file to replace'
|
The message to replace the default banner message that is shown when the drop zone is filled. | ||
size | 'S'
| 'M'
| 'L' | Default: 'M'
|
The size of the DropZone. | ||
getDropOperation | | Default: — |
A function returning the drop operation to be performed when items matching the given types are dropped on the drop target. | ||
onDropEnter | | Default: — |
Handler that is called when a valid drag enters the drop target. | ||
onDropMove | | Default: — |
Handler that is called when a valid drag is moved within the drop target. | ||
onDropActivate | | Default: — |
Handler that is called after a valid drag is held over the drop target for a period of time. This typically opens the item so that the user can drop within it. | ||
onDropExit | | Default: — |
Handler that is called when a valid drag exits the drop target. | ||
onDrop | | Default: — |
Handler that is called when a valid drag is dropped on the drop target. | ||
id | string | Default: — |
The element's unique identifier. See MDN. | ||
aria-label | string | Default: — |
Defines a string value that labels the current element. | ||
aria-labelledby | string | Default: — |
Identifies the element (or elements) that labels the current element. | ||
aria-describedby | string | Default: — |
Identifies the element (or elements) that describes the object. | ||
aria-details | string | Default: — |
Identifies the element (or elements) that provide a detailed, extended description for the object. | ||
UNSAFE_className | UnsafeClassName | Default: — |
Sets the CSS className
for the element. Only use as a last resort. Use the | ||
UNSAFE_style | CSSProperties | Default: — |
Sets inline style for the
element. Only use as a last resort. Use the | ||
slot | string | null | Default: — |
A slot name for the component. Slots allow the component to receive props from a parent
component. An explicit | ||