---
title: sidebar
framework: swiftui
role: symbol
role_heading: Type Property
path: swiftui/searchfieldplacement/sidebar
---

# sidebar

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

## Declaration

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

## Mentioned in

Adding a search interface to your app

## Discussion

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.

## See Also

### Getting a search field placement

- [automatic](swiftui/searchfieldplacement/automatic.md)
- [navigationBarDrawer](swiftui/searchfieldplacement/navigationbardrawer.md)
- [navigationBarDrawer(displayMode:)](swiftui/searchfieldplacement/navigationbardrawer(displaymode:).md)
- [toolbar](swiftui/searchfieldplacement/toolbar.md)
