<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/SearchFieldPlacement/sidebar",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI20SearchFieldPlacementV7sidebarACvpZ"
  },
  "title" : "sidebar"
}
-->

# sidebar

The search field appears in the sidebar of a navigation view.

```
static var sidebar: SearchFieldPlacement { get }
```

## Discussion

The precise placement depends on the platform:

- In iOS and iPadOS the search field appears in the section of
  the navigation bar associated with the sidebar.
- In macOS the search field appears as a sticky header in the sidebar,
  attached to the toolbar.

If a sidebar isn’t available, like when you apply the searchable
modifier to a view other than a navigation split view, SwiftUI uses
automatic placement instead.

> Note: The search field appears inline with
> the sidebar’s content when building with Xcode 16 SDKs or earlier.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)