---
title: FindContext
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/findcontext
---

# FindContext

The status of the find navigator for views which support text editing.

## Declaration

```swift
struct FindContext
```

## Overview

Overview Views which support text editing can use this information to implement a a find navigator that is controlled using the modifiers used for controlling the find navigator throughout the rest of SwiftUI. For example, the following shows a minimal find navigator implementation driven by the find context which falls back to local state if no isPresented binding is provided: struct FindNavigatorDrivenTextInput: View {     @State var text: String = ""     @State var showFindNavigator = false     @Environment(\.findContext) var findContext     var body: some View {         MyTextInputView(text: $text)             .overlay(alignment: .topTrailing) {                 if let context = findContext &&                     context.isPresented?.wrappedValue ?? showFindNavigator                 {                     HStack {                         FindInputView(text: text)                         if context.allowedOperations == .findAndReplace {                             ReplaceInputView(text: $text)                         }                         Button("Close") {                             context.isPresented?.wrappedValue = false                             showFindNavigator = false                         }                     }                 } else {                     Button("Show Find Navigator") {                         context.isPresented?.wrappedValue = true                         showFindNavigator = true                     }                 }             }     } }

## Topics

### Instance Properties

- [isPresented](swiftui/findcontext/ispresented.md)
- [supportsReplace](swiftui/findcontext/supportsreplace.md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Searching for text in a view

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