<!--
{
  "availability" : [
    "iOS: 13.0.0 - 27.0.0",
    "iPadOS: 13.0.0 - 27.0.0",
    "macCatalyst: 13.0.0 - 27.0.0",
    "tvOS: 13.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/navigationBarItems(leading:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE18navigationBarItems7leadingQrqd___tAaBRd__lF"
  },
  "title" : "navigationBarItems(leading:)"
}
-->

# navigationBarItems(leading:)

Sets the navigation bar items for this view.

```
nonisolated func navigationBarItems<L>(leading: L) -> some View where L : View
```

## Parameters

`leading`

A view that appears on the leading edge of the
title.

## Discussion

Use `navigationBarItems(leading:)` to add navigation bar items to the
leading edge of the navigation bar for this view.

This modifier only takes effect when this view is inside of and visible
within a [`NavigationView`](/documentation/SwiftUI/NavigationView).

On iOS 14 and later, the leading item supplements a visible back button,
instead of replacing it, by default. To hide the back button, use
[`navigationBarBackButtonHidden(_:)`](/documentation/SwiftUI/View/navigationBarBackButtonHidden(_:)).

The example below adds buttons to the leading edge of the button area
of the navigation view:

```
struct FlavorView: View {
    var body: some View {
        NavigationView {
            List {
                Text("Chocolate")
                Text("Vanilla")
                Text("Strawberry")
            }
            .navigationBarTitle(Text("Today's Flavors"))
            .navigationBarItems(leading:
                HStack {
                    Button("Hours") {
                        print("Hours tapped!")
                    }

                    Button("Help") {
                        print("Help tapped!")
                    }
                }
            )
        }
    }
}
```

---

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)