<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/FindContext",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI11FindContextV"
  },
  "title" : "FindContext"
}
-->

# FindContext

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

```
struct FindContext
```

## 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

[`var isPresented: Binding<Bool>?`](/documentation/SwiftUI/FindContext/isPresented)

A binding controlling if the find navigator is presented, or nil if no
binding has been provided via the [`findNavigator(isPresented:)`](/documentation/SwiftUI/View/findNavigator(isPresented:))
modifier.

[`var supportsReplace: Bool`](/documentation/SwiftUI/FindContext/supportsReplace)

If the find navigators in this context should support replacing.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)