---
title: Search
framework: swiftui
role: collectionGroup
role_heading: API Collection
path: swiftui/search
---

# Search

Enable people to search for text or other content within your app.

## Overview

Overview To present a search field in your app, create and manage storage for search text and optionally for discrete search terms known as tokens. Then bind the storage to the search field by applying the searchable view modifier to a view in your app.

As people interact with the field, they implicitly modify the underlying storage and, thereby, the search parameters. Your app correspondingly updates other parts of its interface. To enhance the search interaction, you can also: Offer suggestions during search, for both text and tokens. Implement search scopes that help people to narrow the search space. Detect when people activate the search field, and programmatically dismiss the search field using environment values. For design guidance, see Searching in the Human Interface Guidelines.

## Topics

### Searching your app’s data model

- [Adding a search interface to your app](swiftui/adding-a-search-interface-to-your-app.md)
- [Performing a search operation](swiftui/performing-a-search-operation.md)
- [searchable(text:placement:prompt:)](swiftui/view/searchable(text:placement:prompt:).md)
- [searchable(text:tokens:placement:prompt:token:)](swiftui/view/searchable(text:tokens:placement:prompt:token:).md)
- [searchable(text:editableTokens:placement:prompt:token:)](swiftui/view/searchable(text:editabletokens:placement:prompt:token:).md)
- [SearchFieldPlacement](swiftui/searchfieldplacement.md)

### Making search suggestions

- [Suggesting search terms](swiftui/suggesting-search-terms.md)
- [searchSuggestions(_:)](swiftui/view/searchsuggestions(_:).md)
- [searchSuggestions(_:for:)](swiftui/view/searchsuggestions(_:for:).md)
- [searchCompletion(_:)](swiftui/view/searchcompletion(_:).md)
- [searchable(text:tokens:suggestedTokens:placement:prompt:token:)](swiftui/view/searchable(text:tokens:suggestedtokens:placement:prompt:token:).md)
- [SearchSuggestionsPlacement](swiftui/searchsuggestionsplacement.md)

### Limiting search scope

- [Scoping a search operation](swiftui/scoping-a-search-operation.md)
- [searchScopes(_:scopes:)](swiftui/view/searchscopes(_:scopes:).md)
- [searchScopes(_:activation:_:)](swiftui/view/searchscopes(_:activation:_:).md)
- [SearchScopeActivation](swiftui/searchscopeactivation.md)

### Detecting, activating, and dismissing search

- [Managing search interface activation](swiftui/managing-search-interface-activation.md)
- [isSearching](swiftui/environmentvalues/issearching.md)
- [dismissSearch](swiftui/environmentvalues/dismisssearch.md)
- [DismissSearchAction](swiftui/dismisssearchaction.md)
- [searchable(text:isPresented:placement:prompt:)](swiftui/view/searchable(text:ispresented:placement:prompt:).md)
- [searchable(text:tokens:isPresented:placement:prompt:token:)](swiftui/view/searchable(text:tokens:ispresented:placement:prompt:token:).md)
- [searchable(text:editableTokens:isPresented:placement:prompt:token:)](swiftui/view/searchable(text:editabletokens:ispresented:placement:prompt:token:).md)
- [searchable(text:tokens:suggestedTokens:isPresented:placement:prompt:token:)](swiftui/view/searchable(text:tokens:suggestedtokens:ispresented:placement:prompt:token:).md)

### Displaying toolbar content during search

- [searchPresentationToolbarBehavior(_:)](swiftui/view/searchpresentationtoolbarbehavior(_:).md)
- [SearchPresentationToolbarBehavior](swiftui/searchpresentationtoolbarbehavior.md)

### Searching for text in a view

- [findNavigator(isPresented:)](swiftui/view/findnavigator(ispresented:).md)
- [findDisabled(_:)](swiftui/view/finddisabled(_:).md)
- [replaceDisabled(_:)](swiftui/view/replacedisabled(_:).md)
- [FindContext](swiftui/findcontext.md)

## See Also

### App structure

- [App organization](swiftui/app-organization.md)
- [Scenes](swiftui/scenes.md)
- [Windows](swiftui/windows.md)
- [Immersive spaces](swiftui/immersive-spaces.md)
- [Documents](swiftui/documents.md)
- [Navigation](swiftui/navigation.md)
- [Modal presentations](swiftui/modal-presentations.md)
- [Toolbars](swiftui/toolbars.md)
- [App extensions](swiftui/app-extensions.md)
