<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/dataDetection(_:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewP015_DataDetection_aB0E04dataE0_7optionsQr0dE00D8DetectorO9MatchTypeV_AI7OptionsVtF"
  },
  "title" : "dataDetection(_:options:)"
}
-->

# dataDetection(_:options:)

Asynchronously detects data in the view’s content and
styles them to indicate they are clickable.

```
nonisolated func dataDetection(_ types: DataDetector.MatchType = .all, options: DataDetector.Options = .init()) -> some View
```

## Parameters

`types`

The data detector match types

`options`

Data detector options

## Return Value

A view with modified text attributes when matches are
detected

---

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)