Search PanelNew
The body of a search screen: recent and suggested searches, live suggestions with the match highlighted, and results by scope.
Pro pattern · recorded from Pro
The SwiftUI source comes with SwiftPieces Pro.
Every Pro pattern installs with one command once your license is signed in, and re-skins with Pro's design system.
Open it in the Pro library ↗Needs a SwiftPieces Pro license: npx swiftpieces login first.
- Type
- SearchPanel
- Inside
- Recent searches, Suggested chips, Live suggestions, Scoped results
- Install, with a Pro license
- npx swiftpieces add SearchPanel
- Depends on
- Pro's Design System, which installs with it
Drop it under a .searchable field. Before typing it shows recent searches with remove and Clear all and suggested searches as chips; while typing it asks your closure for debounced suggestions with the typed text highlighted; after a search it shows scope chips with counts and a card of results per scope, with loading, failed and no-results states built in.
Its SwiftUI source comes with SwiftPieces Pro: Search Panel in the Pro library.