<!--
{
  "documentType" : "article",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View-Search",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Search modifiers"
}
-->

# Search modifiers

Enable people to search for content in your app.

## Overview

Use search view modifiers to add search capability to your app. For more
information, see [Search](/documentation/SwiftUI/Search).

## Topics

### Displaying a search interface

[`searchable(text:placement:prompt:)`](/documentation/SwiftUI/View/searchable(text:placement:prompt:))

Marks this view as searchable, which configures the display of a
search field.

[`searchable(text:isPresented:placement:prompt:)`](/documentation/SwiftUI/View/searchable(text:isPresented:placement:prompt:))

Marks this view as searchable with programmatic presentation of the
search field.

[`searchPresentationToolbarBehavior(_:)`](/documentation/SwiftUI/View/searchPresentationToolbarBehavior(_:))

Configures the search toolbar presentation behavior for any
searchable modifiers within this view.

[`searchToolbarBehavior(_:)`](/documentation/SwiftUI/View/searchToolbarBehavior(_:))

Configures the behavior for search in the toolbar.

[`searchSelection(_:)`](/documentation/SwiftUI/View/searchSelection(_:))

Binds the selection of the search field associated with the nearest
searchable modifier to the given [`TextSelection`](/documentation/SwiftUI/TextSelection) value.

### Searching with tokens

[`searchable(text:tokens:placement:prompt:token:)`](/documentation/SwiftUI/View/searchable(text:tokens:placement:prompt:token:))

Marks this view as searchable with text and tokens.

[`searchable(text:tokens:isPresented:placement:prompt:token:)`](/documentation/SwiftUI/View/searchable(text:tokens:isPresented:placement:prompt:token:))

Marks this view as searchable with text and tokens, as well as
programmatic presentation.

### Searching with editable tokens

[`searchable(text:editableTokens:isPresented:placement:prompt:token:)`](/documentation/SwiftUI/View/searchable(text:editableTokens:isPresented:placement:prompt:token:))

Marks this view as searchable, which configures the display of a
search field.

[`searchable(text:editableTokens:placement:prompt:token:)`](/documentation/SwiftUI/View/searchable(text:editableTokens:placement:prompt:token:))

Marks this view as searchable, which configures the display of a
search field.

### Making search suggestions

[`searchSuggestions(_:)`](/documentation/SwiftUI/View/searchSuggestions(_:))

Configures the search suggestions for this view.

[`searchSuggestions(_:for:)`](/documentation/SwiftUI/View/searchSuggestions(_:for:))

Configures how to display search suggestions within this view.

[`searchCompletion(_:)`](/documentation/SwiftUI/View/searchCompletion(_:))

Associates a fully formed string with the value of this view when used
as a search suggestion.

[`searchable(text:tokens:suggestedTokens:placement:prompt:token:)`](/documentation/SwiftUI/View/searchable(text:tokens:suggestedTokens:placement:prompt:token:))

Marks this view as searchable with text, tokens, and suggestions.

[`searchable(text:tokens:suggestedTokens:isPresented:placement:prompt:token:)`](/documentation/SwiftUI/View/searchable(text:tokens:suggestedTokens:isPresented:placement:prompt:token:))

Marks this view as searchable with text, tokens, and suggestions, as
well as programmatic presentation.

### Limiting search scope

[`searchScopes(_:scopes:)`](/documentation/SwiftUI/View/searchScopes(_:scopes:))

Configures the search scopes for this view.

[`searchScopes(_:activation:_:)`](/documentation/SwiftUI/View/searchScopes(_:activation:_:))

Configures the search scopes for this view with the specified
activation strategy.

### Searching through dictation

[`searchDictationBehavior(_:)`](/documentation/SwiftUI/View/searchDictationBehavior(_:))

Configures the dictation behavior for any search fields configured
by the searchable modifier.



---

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)