SwiftUI SearchField

The search input box component can be placed in a non-specific location and is consistent with the default search input box style.

SearchField

Installation

You can add MarkdownUI to an Xcode project by adding it as a package dependency.

  1. From the File menu, select Add Packages…
  2. Enter https://github.com/jaywcjlove/swiftui-searchfield the Search or Enter Package URL search field
  3. Link Markdown to your application target

Or add the following to Package.swift:

.package(url: "https://github.com/jaywcjlove/swiftui-searchfield", from: "1.0.1")

Or add the package in Xcode.

Usage

import SearchField

struct ContentView: View {
    @State private var searchText = ""
    var body: some View {
        SearchField(searchText, textFieldChanged: { value in
            print("value\(value)")
            searchText = value
        })
        Text(searchText)
    }
}

License

Licensed under the MIT License.

GitHub

View Github