<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/navigationDestination(isPresented:destination:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE21navigationDestination11isPresented11destinationQrAA7BindingVySbG_qd__yXEtAaBRd__lF"
  },
  "title" : "navigationDestination(isPresented:destination:)"
}
-->

# navigationDestination(isPresented:destination:)

Associates a destination view with a binding that can be used to push
the view onto a [`NavigationStack`](/documentation/SwiftUI/NavigationStack).

```
nonisolated func navigationDestination<V>(isPresented: Binding<Bool>, @ContentBuilder destination: () -> V) -> some View where V : View
```

## Parameters

`isPresented`

A binding to a Boolean value that indicates whether
`destination` is currently presented.

`destination`

A view to present.

## Discussion

In general, favor binding a path to a navigation stack for programmatic
navigation. Add this view modifier to a view inside a [`NavigationStack`](/documentation/SwiftUI/NavigationStack)
to programmatically push a single view onto the stack. This is useful
for building components that can push an associated view. For example,
you can present a `ColorDetail` view for a particular color:

```
@State private var showDetails = false
var favoriteColor: Color

NavigationStack {
    VStack {
        Circle()
            .fill(favoriteColor)
        Button("Show details") {
            showDetails = true
        }
    }
    .navigationDestination(isPresented: $showDetails) {
        ColorDetail(color: favoriteColor)
    }
    .navigationTitle("My Favorite Color")
}
```

Do not put a navigation destination modifier inside a “lazy” container,
like [`List`](/documentation/SwiftUI/List) or [`LazyVStack`](/documentation/SwiftUI/LazyVStack). These containers create child views
only when needed to render on screen. Add the navigation destination
modifier outside these containers so that the navigation stack can
always see the destination.

---

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)