<div class='type'>Compose Modifier</div>

<a id='references'></a>


<h2 id="draganddroptarget-shouldstartdraganddrop-target">dragAndDropTarget</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun Modifier.dragAndDropTarget(
    shouldStartDragAndDrop: (startEvent: DragAndDropEvent) -> Boolean,
    target: DragAndDropTarget,
): Modifier
```


A modifier that allows for receiving from a drag and drop gesture.

Learn how to use `Modifier.dragAndDropTarget` to receive drag and drop events from inside your
app or from other apps:


All drag and drop target modifiers in the hierarchy will be given an opportunity to participate
in a given drag and drop session via `shouldStartDragAndDrop`.

#### Parameters

| | |
| --- | --- |
| shouldStartDragAndDrop | Allows the Composable to decide if it wants to receive from a given drag and drop session by inspecting the `DragAndDropEvent` that started the session. |
| target | The `DragAndDropTarget` that will receive events for a given drag and drop session. |