<!--
{
  "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",
    "watchOS: 6.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/navigationBarTitle(_:)-6p1k7",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE18navigationBarTitleyQrAA4TextVF"
  },
  "title" : "navigationBarTitle(_:)"
}
-->

# navigationBarTitle(_:)

Sets the title in the navigation bar for this view.

```
nonisolated func navigationBarTitle(_ title: Text) -> some View
```

## Parameters

`title`

A description of this view to display in the
navigation bar.

## Discussion

Use `navigationBarTitle(_:)` to set the title of the navigation bar.
This modifier only takes effect when this view is inside of and visible
within a `NavigationView`.

The example below shows setting the title of the navigation bar using a
`Text` view:

```
struct FlavorView: View {
    let items = ["Chocolate", "Vanilla", "Strawberry", "Mint Chip",
                 "Pistachio"]
    var body: some View {
        NavigationView {
            List(items, id: \.self) {
                Text($0)
            }
            .navigationBarTitle(Text("Today's Flavors"))
        }
    }
}
```

![A screenshot showing the title of a navigation bar configured using a text view.](images/com.apple.SwiftUI/SwiftUI-navigationBarTitle-Text@2x.png)

---

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)