Skip to main content

Drop Zone

The DropZone element provides a way to drag and drop content into a designated area. Helpful for uploading files.

Drop files here


Usage

import { DropZone } from "@newfold/ui-component-library";

<DropZone
onDrop={ (e) => console.log(e.dataTransfer.items) }
>
<Title className="nfd-text-center">Drop files here</Title>
</DropZone>

Disabled

Use the disabled prop to disable the DropZone component.

Drop files here

<DropZone
disabled
onDrop={ (e) => console.log(e.dataTransfer.items) }
>
<Title className="nfd-text-center">Drop files here</Title>
</DropZone>

Props

AttributeTypeDescriptionDefault
onDrop*function | Fires when files are dropped. The function will receive the event object as an argument.-
childrennode | The children.-
disabledbool | Whether the drop zone is disabled.-
classNamestring | --
tabIndexstring | --

Hello From Root