SearchBar
Expert guidance on SearchBar, a customizable SwiftUI search component. Use when developers mention: (1) SearchBar, (2) custom search bars in SwiftUI, (3) search tokens or suggestions, (4) styling search bars (glass, capsule), (5) cross-platform search (iOS, macOS, visionOS), (6) specific SearchBar modifiers like .searchBarStyle or .searchBarSuggestions.
Why use this skill?
Learn how to build, style, and manage cross-platform search experiences in SwiftUI using the SearchBar skill for OpenClaw. Expert tips for iOS, macOS, and visionOS.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/szpakkamil/searchbarWhat This Skill Does
The SearchBar skill for OpenClaw provides comprehensive developer assistance for integrating and customizing the SearchBar component in SwiftUI. It acts as an expert companion for implementing native-feeling search interfaces across Apple platforms (iOS, iPadOS, macOS, and visionOS). Whether you are building a basic search input or complex interfaces involving tokens and dynamic suggestions, this skill guides you through the unified API, ensuring your UI components adhere to Apple's design guidelines while remaining highly extensible.
Installation
To integrate this skill into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/szpakkamil/searchbar
Use Cases
This skill is essential when:
- Implementing search functionality that needs to feel native on iOS/visionOS while maintaining parity on macOS.
- Styling search bars with specific aesthetic requirements like glass-morphism, capsule shapes, or custom iconography.
- Managing advanced data-driven search features such as search tokens (filters) and dynamic suggestion lists.
- Troubleshooting platform-specific layout issues where the behavior of
UISearchBardiffers from native SwiftUI views. - Managing search bar focus states or handling programmatic clear/cancel events.
Example Prompts
- "How can I implement a glass-styled search bar in my visionOS app and add persistent filter tokens?"
- "I am having trouble with the .searchBarSuggestions modifier on macOS. Can you provide a standard implementation for dynamic search filtering?"
- "What is the best way to handle focus state in a cross-platform SearchBar to ensure it dismisses correctly on iPhone but stays active on macOS?"
Tips & Limitations
- Version Requirements: Always be mindful that while basic SearchBar components are available on iOS 14+, advanced features like tokens and suggestions require at least iOS 16.0 or visionOS 1.0.
- Platform Parity: While the library abstracts many differences, use
#if os(...)blocks when you need to apply deep platform-specific logic that the unified API cannot satisfy. - Localization: Remember that SearchBar localizes itself. Do not hardcode strings for placeholder text if you want your app to support system-level multi-language setups; use standard resource strings.
- Focus Management: Leverage the
.searchBarIsFocusedmodifier to avoid manualFocusStatemanagement, as it is the most reliable way to maintain synchronization between your state and the component.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-szpakkamil-searchbar": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Related Skills
PagerKit
Expert guidance on PagerKit, a SwiftUI library for advanced, customizable page-based navigation. Use when developers mention: (1) PagerKit, PKPagesView, PKPage, (2) custom page controls, indicators, or paging behavior, (3) cross-platform SwiftUI paging, (4) dynamic page generation, (5) integrating page views into custom layouts, (6) specific PagerKit modifiers or enums, (7) page view controller options, (8) event handling for page changes.
ColorKit
Expert guidance on ColorKit, a Swift library for advanced color manipulation, conversion, and accessibility management. Use when developers mention: (1) CKColor, CKBlendMode, CKAPCA, (2) color space conversion (OKLAB, Display P3, sRGB), (3) WCAG or APCA contrast checks, (4) hex color initialization, (5) dynamic/adaptive colors for Dark Mode, (6) perceptual gamut mapping.
SymbolPicker
Expert guidance on SymbolPicker, a native SwiftUI SF Symbol picker. Use when developers mention: (1) SymbolPicker, (2) selecting SF Symbols, (3) picking symbols with colors, (4) customizing symbol picker appearance, (5) cross-platform symbol selection (iOS, macOS, visionOS), (6) specific modifiers like .symbolPickerSymbolsStyle or .symbolPickerDismiss.