<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLookUI",
  "identifier" : "/documentation/QuickLookUI/QLPreviewItem",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Quick Look UI"
    ],
    "preciseIdentifier" : "c:objc(pl)QLPreviewItem"
  },
  "title" : "QLPreviewItem"
}
-->

# QLPreviewItem

A protocol that defines a set of properties you implement to make a preview of your app’s content.

```
protocol QLPreviewItem : NSObjectProtocol
```

## Overview

Implement the properties in this protocol to make your app’s content visible in a Quick Look preview. Use  <doc://com.apple.documentation/documentation/QuickLook/QLPreviewController> to display a Quick Look preview on iOS, [`QLPreviewPanel`](/documentation/QuickLookUI/QLPreviewPanel) and [`QLPreviewView`](/documentation/QuickLookUI/QLPreviewView) on macOS.

The properties in the [`QLPreviewItem`](/documentation/QuickLookUI/QLPreviewItem) protocol are also declared as a category on the `NSURL` class. As a result, you can use <doc://com.apple.documentation/documentation/Foundation/NSURL> objects directly as preview items, provided that you want to use the default titles of those items. The default title for an `NSURL` object is the last path component of an item’s URL. To supply custom titles for preview objects, implement a class conforming to this protocol, supplying the title with the [`previewItemTitle`](/documentation/QuickLookUI/QLPreviewItem/previewItemTitle) property.

## Topics

### Instance Properties

[`var previewItemDisplayState: Any!`](/documentation/QuickLookUI/QLPreviewItem/previewItemDisplayState)

The display state for the preview item.

[`var previewItemTitle: String!`](/documentation/QuickLookUI/QLPreviewItem/previewItemTitle)

The title to display for the preview item.

[`var previewItemURL: URL!`](/documentation/QuickLookUI/QLPreviewItem/previewItemURL)

The URL of the item to preview.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)