<!--
{
  "availability" : [
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/textInputSuggestions(_:content:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE20textInputSuggestions_7contentQrqd___qd_0_7ElementQyd__ctSkRd__AaBRd_0_s12IdentifiableAGRQr0_lF"
  },
  "title" : "textInputSuggestions(_:content:)"
}
-->

# textInputSuggestions(_:content:)

Configures the text input suggestions for this view.

```
nonisolated func textInputSuggestions<Data, Content>(_ data: Data, @ContentBuilder content: @escaping (Data.Element) -> Content) -> some View where Data : RandomAccessCollection, Content : View, Data.Element : Identifiable
```

## Parameters

`data`

The data that is used to create views dynamically.

`content`

The content builder that creates views dynamically.

## Discussion

You can suggest text completions during a text input operation by
providing data to this modifier. The interface presents the suggestion
views as a list of choices when someone activates the text editing
interface.

Associate a string with each suggestion view by adding the
[`textInputCompletion(_:)`](/documentation/SwiftUI/View/textInputCompletion(_:)) modifier to the view.

Use `Label` to get platform-standard visual representations of
suggestion text accompanied with images, and `Section` for labelled
sections of results.

---

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)