<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDragItem/previewProvider",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDragItem(py)previewProvider"
  },
  "title" : "previewProvider"
}
-->

# previewProvider

A visual preview of the drag item, displayed while the user drags the item across the screen.

```
var previewProvider: (() -> UIDragPreview?)? { get set }
```

## Discussion

As the user drags an item across the screen, the system displays a preview. You can change the preview by setting [`previewProvider`](/documentation/UIKit/UIDragItem/previewProvider) to a block that returns a [`UIDragPreview`](/documentation/UIKit/UIDragPreview) object. The system invokes the block if and when it needs the drag item preview.

To use the default preview, set [`previewProvider`](/documentation/UIKit/UIDragItem/previewProvider) to `nil`. To hide the preview, set [`previewProvider`](/documentation/UIKit/UIDragItem/previewProvider) to a block that returns `nil`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)