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

# quickLookPreview(_:)

Presents a Quick Look preview of the contents of a single URL.

## Declaration

```swift
nonisolated func quickLookPreview(_ item: Binding<URL?>) -> some View

```

## Parameters

- `item`: A doc://com.apple.documentation/documentation/SwiftUI/Binding to a URL that should be previewed.

## Return Value

Return Value A view that presents the preview of the contents of the URL.

## Discussion

Discussion The Quick Look preview appears when you set the binding to a non-nil item. When you set the item back to nil, Quick Look dismisses the preview. Upon dismissal by the user, Quick Look automatically sets the item binding to nil. Quick Look displays the preview when a non-nil item is set. Set item to nil to dismiss the preview.

## See Also

### Previewing content

- [quickLookPreview(_:in:)](swiftui/view/quicklookpreview(_:in:).md)
