कंटेंट पर जाएँ
TakoAPI
स्किल्स पर वापस

searchbar

szpakkamil द्वारा

Search & Research
1.3kclawskills.sh द्वारा बताए गए डाउनलोड
1स्टार
0व्यूज़
0 लाइकइस स्किल को लाइक करने के लिए साइन इन करें
—अभी तक कोई रेटिंग नहीं
आपकी रेटिंग

संक्षिप्त

Expert guidance on SearchBar, a customizable SwiftUI search component.

विवरण

यह स्किल क्या करती है

SearchBar is a SwiftUI library that provides a unified search component across iOS, iPadOS, macOS, and visionOS. It wraps UISearchBar on iOS and visionOS while using a native SwiftUI implementation on macOS, exposing a consistent modifier-based API for both. Advanced features like search tokens and dynamic suggestions require iOS 16+ or visionOS 1.0+.

Using UISearchBar directly requires UIKit bridging on iOS and has no macOS equivalent, while this library exposes one SwiftUI API that works consistently across all Apple platforms.

इसे कब इस्तेमाल करें

  • Adding a styled search bar to a SwiftUI app without UIKit bridging
  • Filtering content with tappable search tokens on iOS 16+
  • Showing contextual suggestions as users type in a search field
  • Applying glass or capsule visual styles to a search bar
  • Shipping the same search UI across iPhone, iPad, Mac, and Vision Pro

उदाहरण वर्कफ़्लो

इनपुट

User asks: How do I add a search bar with token filtering to my SwiftUI app?

एजेंट
  1. 1

    Confirm the deployment target is iOS 16.0+ to ensure token and suggestions support

  2. 2

    Set up @State properties for text, active tokens, and suggestions array

  3. 3

    Initialize SearchBar with the text binding and a prompt string

  4. 4

    Attach .searchBarCurrentTokens and .searchBarSuggestions modifiers with their bindings

  5. 5

    Apply .searchBarStyle to set shape and colors if custom appearance is needed

आउटपुट

A SwiftUI view with a functional search bar that displays filter tokens and dynamic suggestions

इंस्टॉलेशन

clawhub install szpakkamil/searchbar

CLI कमांड चलाएँ, या प्रॉम्प्ट को Claude Code, Cursor, Codex या जो भी कोडिंग एजेंट आप इस्तेमाल करते हैं उसमें पेस्ट करें।

लिंक