# Blazor DropZone Overview

The <a href="https://www.telerik.com/blazor-ui/dropzone" target="_blank">Telerik UI for Blazor DropZone component</a> allows you to declare an external drop zone for an existing [FileSelect](https://www.telerik.com/blazor-ui/documentation/components/fileselect/overview) or [Upload](https://www.telerik.com/blazor-ui/documentation/components/upload/overview) component.

This integration enables the users to drag and drop one or multiple files to a designated space in their viewport. Dropping the files in the connected DropZone area will automatically select or upload them respectively.

## Creating Blazor DropZone

1. Add the DropZone to your Razor page by using the `TelerikDropZone` tag.
2. Set the `Id` parameter of the component.
3. Set the `DropZoneId` of the [FileSelect](https://www.telerik.com/blazor-ui/documentation/components/fileselect/overview#fileselect-parameters) or [Upload](https://www.telerik.com/blazor-ui/documentation/components/upload/overview#upload-parameters) component to match the `Id` of the DropZone.
4. (Optional) Add a note to the DropZone by using the `NoteText` setting.

> caption Basic configuration of the DropZone with the FileSelect component.

<demo metaUrl="client/dropzone/overview/" height="260"></demo>

## Integration with the Upload and FileSelect

You can integrate the DropZone with both the [FileSelect](https://www.telerik.com/blazor-ui/documentation/components/fileselect/overview) or [Upload](https://www.telerik.com/blazor-ui/documentation/components/upload/overview) components. This will allow users to drop files and automatically select or upload them.

The connection is achieved by simply matching the value of the DropZone `Id` parameter with the `DropZoneId` parameter of the FileSelect or the Upload component.

Once the user drops a file in the external DropZone, the file is automatically sent to the connected FileSelect/Upload. This action effectively raises the `OnSelect` event of the [FileSelect](https://www.telerik.com/blazor-ui/documentation/components/fileselect/events#onselect) or [Upload](https://www.telerik.com/blazor-ui/documentation/components/upload/events#onselect). You can handle that to perform further actions with the dropped file(s).

## Template

The DropZone allows you to customize its rendering and appearance through a `Template` configuration. [Read more about using the DropZone template...](https://www.telerik.com/blazor-ui/documentation/components/dropzone/template)

## Parameters

The following table lists DropZone parameters. Check the [DropZone API Reference](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.telerikdropzone) for a full list of properties, methods and events.

<style>
    .article table {
        table-layout: auto;
        word-break: normal;
    }
</style>

| Parameter  | Type and Default Value | Description                                                                                                                                                                                                                                                |
| ---------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Id`       | `string`               | The id of the DropZone. Assign the same value of the corresponding Upload or FileSelect component to the `DropZoneId`.                                                                                                                                     |
| `Enabled`  | `bool` <br /> (`true`) | Specifies whether the DropZone is enabled.                                                                                                                                                                                                                 |
| `HintText` | `string`               | The text for the hint of the DropZone. If not provided, the DropZone will render a default value ("Drag and drop files here to upload"). The label text is also [localizable](https://www.telerik.com/blazor-ui/documentation/globalization/localization). |
| `NoteText` | `string`               | Optional content inside the DropZone. Use it to render any additional information below the hint. The label text is also [localizable](https://www.telerik.com/blazor-ui/documentation/globalization/localization).                                        |
| `Multiple` | `bool` <br /> (`true`) | Enables the user to drop several files at the same time.                                                                                                                                                                                                   |

### Styling and Appearance

The following parameters enable you to customize the appearance of the Blazor DropZone:

| Parameter       | Type     | Description                                                                                                                                                                                                                                                                    |
| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Class`         | `string` | The CSS class that will be rendered on the main wrapping element of the DropZone (`<div class="k-external-dropzone">`). Use it for [overriding the theme or applying custom styles](https://www.telerik.com/blazor-ui/documentation/styling-and-themes/override-theme-styles). |
| `DragOverClass` | `string` | The CSS class that will be rendered on the main wrapping element of the DropZone when a file is dragged over it. Use it for [conditionally styling the component during a dragover action](https://demos.telerik.com/blazor-ui/dropzone/overview).                             |
| `Width`         | `string` | The width of the DropZone. Accepts a valid CSS value (see the [Dimensions article](https://www.telerik.com/blazor-ui/documentation/common-features/dimensions)).                                                                                                               |
| `Height`        | `string` | The height of the DropZone. Accepts a valid CSS value (see the [Dimensions article](https://www.telerik.com/blazor-ui/documentation/common-features/dimensions)).                                                                                                              |

## Next Steps

* [Using the DropZone Template for custom content](https://www.telerik.com/blazor-ui/documentation/components/dropzone/template)

## See Also

* [Live Demo: Blazor DropZone Overview and Key Features](https://demos.telerik.com/blazor-ui/dropzone/overview)
* [Display DropZone Over the Whole Page](https://www.telerik.com/blazor-ui/documentation/knowledge-base/dropzone-display-over-whole-page)
