<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKWebView/allowsLinkPreview",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKWebView(py)allowsLinkPreview"
  },
  "title" : "allowsLinkPreview"
}
-->

# allowsLinkPreview

A Boolean value that determines whether pressing a link displays a preview of the destination for the link.

```
var allowsLinkPreview: Bool { get set }
```

## Discussion

In iOS, this property is available on devices that support 3D Touch. In iOS 10 and later, the default value is <doc://com.apple.documentation/documentation/Swift/true>; in previous versions of iOS, the default value is <doc://com.apple.documentation/documentation/Swift/false>.

If you set this property’s value to <doc://com.apple.documentation/documentation/Swift/true>, an iOS user can press links to preview link destinations and detected data such as addresses and phone numbers. Such previews are known to users as *peeks*. If a user presses deeper on a link preview, the preview navigates (or *pops*, in user terminology) to the destination. Because pop navigation switches the user from your app to Safari, it is opt-in for iOS apps.

If you want to support link preview in iOS but also want to keep users within your app, you can switch from using the [`WKWebView`](/documentation/WebKit/WKWebView) class to the <doc://com.apple.documentation/documentation/SafariServices/SFSafariViewController> class. If you are using a web view as an in-app browser, making this change is best practice. The Safari view controller class automatically supports link previews.

In macOS, this property is available on devices with a Force Touch trackpad. The default value is <doc://com.apple.documentation/documentation/Swift/true>.

With this property set to its default value of <doc://com.apple.documentation/documentation/Swift/true>, a macOS user can force click a link to display a preview window showing the link’s destination. If the user then clicks the preview, the destination opens in Safari.

On both platforms, all types of detected data respond to presses when this property is set to <doc://com.apple.documentation/documentation/Swift/true>. That is, in iOS 9 and OS X 10.11, you cannot specify which types of data are detected in the [`WKWebView`](/documentation/WebKit/WKWebView) class.

---

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)