---
title: "dropConfiguration(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/dropconfiguration(_:)"
---

# dropConfiguration(_:)

Configures a drop session.

## Declaration

```swift
nonisolated func dropConfiguration(_ configuration: @escaping (DropSession) -> DropConfiguration) -> some View

```

## Parameters

- `configuration`: A value that describes the configuration of a drop session.

## Return Value

Return Value A view that configures a drop session in a way, described by the return value of the configuration parameter.

## Discussion

Discussion Below is an example of a view that accepts drop of Image type. The view prefers drop operation move in a case when the source supports it (the source will remove the images from its storage after the drop operation). If the source does not support moving images, the destination will make copies.        ExampleView()            .dropDestination(for: Image.self) { images, _ in                process(images)            }            .dropConfiguration { dropSession in                if dropSession.suggestedOperations.contains(.move) {                    return DropConfiguration(operation: .move)                }                return DropConfiguration(operation: .copy)            } note: The closure that provides the configuration is called frequently to allow specifying different operations for different drop locations in a view. Do not perform any expensive calculations in it.

## See Also

### Configuring drag-and-drop behavior

- [dragConfiguration(_:)](swiftui/view/dragconfiguration(_:).md)
- [DragConfiguration](swiftui/dragconfiguration.md)
- [DropConfiguration](swiftui/dropconfiguration.md)
- [dragContainer(for:in:_:)](swiftui/view/dragcontainer(for:in:_:).md)
- [dragContainer(for:itemID:in:_:)](swiftui/view/dragcontainer(for:itemid:in:_:).md)
- [dragContainerSelection(_:containerNamespace:)](swiftui/view/dragcontainerselection(_:containernamespace:).md)
