<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/matchedTransitionSource(id:in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE23matchedTransitionSource2id2inQrqd___AA9NamespaceV2IDVtSHRd__lF"
  },
  "title" : "matchedTransitionSource(id:in:)"
}
-->

# matchedTransitionSource(id:in:)

Identifies this view as the source of a navigation transition, such
as a zoom transition.

```
nonisolated func matchedTransitionSource(id: some Hashable, in namespace: Namespace.ID) -> some View
```

## Parameters

`id`

The identifier, often derived from the identifier of
the data being displayed by the view.

`namespace`

The namespace in which defines the `id`. New
namespaces are created by adding an [`Namespace`](/documentation/SwiftUI/Namespace) variable
to a [`View`](/documentation/SwiftUI/View) type and reading its value in the view’s body
method.

---

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)