Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danielsaidi/quicksearch
QuickSearch is a SwiftUI SDK that lets you type into a searchable text field without first having to focus on it.
https://github.com/danielsaidi/quicksearch
ios macos swift swiftui visionos
Last synced: 8 days ago
JSON representation
QuickSearch is a SwiftUI SDK that lets you type into a searchable text field without first having to focus on it.
- Host: GitHub
- URL: https://github.com/danielsaidi/quicksearch
- Owner: danielsaidi
- License: mit
- Created: 2023-12-19T10:59:05.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-13T21:15:02.000Z (8 months ago)
- Last Synced: 2024-05-01T18:07:52.783Z (6 months ago)
- Topics: ios, macos, swift, swiftui, visionos
- Language: Swift
- Homepage:
- Size: 829 KB
- Stars: 22
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
## About QuickSearch
QuickSearch is a SwiftUI SDK that lets you type into a `.searchable` text field by just typing, without first having to focus on it.
Unlike the native `.searchable(text: $query, isPresented: .constant(true))` modifier, QuickSearch doesn't show the input cursor, to avoid draving attention to the search field.
## Installation
QuickSearch can be installed with the Swift Package Manager:
```
https://github.com/danielsaidi/QuickSearch.git
```## Getting Started
All you have to do to make QuickSearch work, is to apply `quickSearch: true` to `.searchable`:
```swift
struct ContentView: View {
@State
var query = ""
@State
var text = ""
@FocusState
var isTextFieldFocused
var body: some View {
NavigationStack {
VStack {
TextField("Type here...", text: $text)
}
.searchable(text: $query, quickSearch: true)
}
}
}
```You can also apply the `.quickSearch` view modifier, to any superview, if you can't access `.searchable`, use custom focus bindings, etc.
## Documentation
The online [documentation][Documentation] has more information, articles, code examples, etc.
## Demo Application
The `Demo` folder has an app that lets you explore the library.
## Support my work
You can [sponsor me][Sponsors] on GitHub Sponsors or [reach out][Email] for paid support, to help support my [open-source projects][OpenSource].
Your support makes it possible for me to put more work into these projects and make them the best they can be.
## Contact
Feel free to reach out if you have questions or want to contribute in any way:
* Website: [danielsaidi.com][Website]
* Mastodon: [@[email protected]][Mastodon]
* Twitter: [@danielsaidi][Twitter]
* E-mail: [[email protected]][Email]## License
QuickSearch is available under the MIT license. See the [LICENSE][License] file for more info.
[Email]: mailto:[email protected]
[Website]: https://danielsaidi.com
[GitHub]: https://github.com/danielsaidi
[Twitter]: https://twitter.com/danielsaidi
[Mastodon]: https://mastodon.social/@danielsaidi
[OpenSource]: https://danielsaidi.com/opensource
[Sponsors]: https://github.com/sponsors/danielsaidi[Documentation]: https://danielsaidi.github.io/QuickSearch
[Getting-Started]: https://danielsaidi.github.io/QuickSearch/documentation/quicksearch/getting-started[License]: https://github.com/danielsaidi/QuickSearch/blob/master/LICENSE