<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/SearchFieldPlacement/navigationBarDrawer(displayMode:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI20SearchFieldPlacementV19navigationBarDrawer11displayModeA2C010Navigationgh7DisplayJ0V_tFZ"
  },
  "title" : "navigationBarDrawer(displayMode:)"
}
-->

# navigationBarDrawer(displayMode:)

The search field appears in the navigation bar using the specified
display mode.

```
static func navigationBarDrawer(displayMode: SearchFieldPlacement.NavigationBarDrawerDisplayMode) -> SearchFieldPlacement
```

## Parameters

`displayMode`

A control that indicates whether to hide
the search field in response to scrolling.

## Discussion

The field appears below any navigation bar title. The system can
hide the field in response to scrolling, depending on the `displayMode`
that you set.

---

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)