---
title: "dataDetection(_:options:)"
framework: swiftui
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, visionOS 27.0+, watchOS 27.0+]
path: "swiftui/view/datadetection(_:options:)"
---

# dataDetection(_:options:)

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

## Declaration

```swift
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

Return Value A view with modified text attributes when matches are detected
