# Send SearchBar to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "searchbar",
    "name": "SearchBar",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/SzpakKamil/searchbar",
    "canonicalUrl": "https://clawhub.ai/SzpakKamil/searchbar",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/searchbar",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=searchbar",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/SearchBar.md",
      "references/SearchBarData.md",
      "references/SearchBarDisplayModes.md",
      "references/SearchBarModifiers.md",
      "references/SearchBarStyle.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "searchbar",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-08T13:26:17.058Z",
      "expiresAt": "2026-05-15T13:26:17.058Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=searchbar",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=searchbar",
        "contentDisposition": "attachment; filename=\"searchbar-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "searchbar"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/searchbar"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/searchbar",
    "downloadUrl": "https://openagent3.xyz/downloads/searchbar",
    "agentUrl": "https://openagent3.xyz/skills/searchbar/agent",
    "manifestUrl": "https://openagent3.xyz/skills/searchbar/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/searchbar/agent.md"
  }
}
```
## Documentation

### Overview

This skill provides expert guidance on SearchBar, a powerful and highly customizable SwiftUI component for creating native-feeling search experiences across iOS, iPadOS, macOS, and visionOS. It bridges the gap between UISearchBar (iOS/visionOS) and native SwiftUI views (macOS), offering a unified API for styling, behavior, and advanced features like search tokens and dynamic suggestions.

### Agent Behavior (Follow These Rules)

Identify Platform Targets: SearchBar behaves slightly differently on iOS/visionOS (wraps UISearchBar) vs. macOS (custom SwiftUI). Always check or ask for the target platform to provide accurate advice (e.g., specific material effects or token behaviors).
Prioritize Modifiers: Direct users to the relevant SearchBar modifiers (e.g., .searchBarStyle, .searchBarSuggestions) rather than suggesting they build custom views from scratch.
Clarify Availability: Explicitly mention version requirements (iOS 14+, iOS 16+ for tokens/suggestions) when discussing advanced features.
Emphasize Localization: Remind users that SearchBar is fully localized and adapts to system languages automatically.
Contextual Examples: Provide concise code snippets that illustrate the recommended usage within a View, often with a binding to @State for text and tokens.
Highlight Cross-Platform: When possible, remind users of SearchBar's cross-platform consistency and how to handle platform-specific differences using #if os(...) directives if necessary (though the library handles most internally).

### Project Settings

Deployment Targets: iOS 14.0+, iPadOS 14.0+, macOS 11.0+, visionOS 1.0+.
Advanced Features: Tokens and Suggestions require iOS 16.0+, iPadOS 16.0+, visionOS 1.0+. (Suggestions also on macOS 15.0+).
Swift Version: Swift 5.9+.

### Quick Decision Tree

Setting up a basic search bar?

Basic init and setup → references/SearchBar.md



Customizing appearance?

Changing colors, shape (capsule/rounded) → references/SearchBarStyle.md
Using "Glass" or "Solid" materials → references/SearchBarStyle.md
Changing the size/scale → references/SearchBarStyle.md
Custom icon → references/SearchBarModifiers.md (.searchBarIconView)



Configuring behavior?

Showing/Hiding Cancel or Clear buttons → references/SearchBarDisplayModes.md
Handling events (begin/end editing, clear, cancel) → references/SearchBarModifiers.md
Focus management → references/SearchBarModifiers.md (.searchBarIsFocused)



Using advanced search features (iOS 16+/visionOS)?

Adding filter tokens (capsules) → references/SearchBarData.md
Showing search suggestions → references/SearchBarData.md
Enabling automatic suggestion filtering → references/SearchBarData.md

### Triage-First Playbook

"My search bar looks different on macOS."

Explain that macOS uses a pure SwiftUI implementation while iOS uses UISearchBar. Styling is consistent but underlying implementation differs.


"Tokens/Suggestions are not showing up."

Verify the deployment target is iOS 16.0+ or visionOS 1.0+.
Ensure the binding to tokens/suggestions is active and populated.


"How do I change the background color?"

Use .searchBarStyle(..., backgroundColor: .red). See references/SearchBarStyle.md.


"I want to hide the cancel button."

Use .searchBarCancelButtonDisplayMode(.never). See references/SearchBarDisplayModes.md.


"How do I make the search bar glass/transparent?"

Use .searchBarMaterial(.glass). Note platform/version restrictions (iOS 26+). See references/SearchBarStyle.md.

### Basic Setup

SearchBar(text: $text, prompt: "Search...")
    .searchBarStyle(.rounded)

### Advanced Styling

SearchBar(text: $text)
    .searchBarStyle(.capsule, textColor: .white, tint: .blue, backgroundColor: .black.opacity(0.8))
    .searchBarMaterial(.glass) // iOS 26+ (Experimental/Future)

### Tokens & Suggestions

SearchBar(text: $text)
    .searchBarCurrentTokens($tokens)
    .searchBarSuggestions($suggestions)
    .searchBarEnableAutomaticSuggestionsFiltering(true)

### Event Handling

SearchBar(text: $text)
    .searchBarBeginEditingAction { print("Started") }
    .searchBarEndEditingAction { print("Ended") }
    .searchBarCancelButtonAction { print("Cancelled") }

### Integration Quick Guide

SearchBar is integrated via Swift Package Manager.

Add Package Dependency: In Xcode, go to File > Add Package Dependency and enter https://github.com/SzpakKamil/SearchBar.git.
Import: import SearchBar in your Swift files.
Deployment Targets: Ensure your project targets iOS 14.0+, macOS 11.0+, visionOS 1.0+.

For detailed setup, see references/SearchBar.md.

### Reference Files

SearchBar.md - General overview, setup, and initialization.
SearchBarModifiers.md - Comprehensive list of all modifiers.
SearchBarStyle.md - Styling, materials, corner styles, and scale.
SearchBarDisplayModes.md - Cancel and Clear button behaviors.
SearchBarData.md - Search Tokens and Suggestions.
_index.md - Index of all topics.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: SzpakKamil
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-08T13:26:17.058Z
- Expires at: 2026-05-15T13:26:17.058Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/searchbar)
- [Send to Agent page](https://openagent3.xyz/skills/searchbar/agent)
- [JSON manifest](https://openagent3.xyz/skills/searchbar/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/searchbar/agent.md)
- [Download page](https://openagent3.xyz/downloads/searchbar)