QuickSearch is a SwiftUI SDK that lets you type into a searchable text field without first having to focus on it.

What's New


💡 Behavior Changes

  • Pressing escape now resets the search field.
  • Quick search now ignores any modified pressed.
  • iOS & macOS now uses two different quick search approaches.

🐛 Bug Fixes

  • Backspace now works on both iOS and macOS.

QuickSearch Logo

Version Swift 5.9 Swift UI MIT License Twitter: @danielsaidi Mastodon: @danielsaidi@mastodon.social

About QuickSearch

QuickSearch lets type into a searchable text fields by typing on the keyboard without first having to focus on the text field.

QuickSearch can be enabled by applying a quickSearch modifier to a view hierarchy that contains a .searchable view modifier:

 struct ContentView: View {
     var query = ""
     var text = ""
     var isTextFieldFocused
     var body: some View {
         NavigationStack {
             VStack {
                TextField("Type here...", text: $text)
             .quickSearch(text: $query)
             .searchable(text: $query)

When the app launches, the user can now start typing on the keyboard without first focusing on the search text field.


QuickSearch can be installed with the Swift Package Manager:


If you prefer to not have external dependencies, you can also just copy the source code into your app.

Support my work

You can sponsor me on GitHub Sponsors or reach out for paid support, to help support my open-source projects.


Feel free to reach out if you have questions or if you want to contribute in any way:


QuickSearch is available under the MIT license. See the LICENSE file for more info.


  • Swift Tools 5.9.0
View More Packages from this Author


  • None
Last updated: Tue Mar 26 2024 06:28:26 GMT-0900 (Hawaii-Aleutian Daylight Time)