<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/NavigationTransition/zoom(sourceID:in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI20NavigationTransitionPA2A04ZoomcD0VRszrlE4zoom8sourceID2inAEqd___AA9NamespaceV0H0VtSHRd__lFZ"
  },
  "title" : "zoom(sourceID:in:)"
}
-->

# zoom(sourceID:in:)

A navigation transition that zooms the appearing view from a
given source view.

```
static func zoom(sourceID: some Hashable, in namespace: Namespace.ID) -> ZoomNavigationTransition
```

## Parameters

`sourceID`

The identifier you provide to a corresponding
`matchedTransitionSource` modifier.

`namespace`

The namespace where you define the `id`. You can create
new namespaces by adding the [`Namespace`](/documentation/SwiftUI/Namespace) attribute
to a [`View`](/documentation/SwiftUI/View) type, then reading its value in the view’s body
method.

## Discussion

Indicate the source view using the
[`matchedTransitionSource(id:in:)`](/documentation/SwiftUI/View/matchedTransitionSource(id:in:)) modifier.

> Note: The zoom transition is not supported in tvOS. Navigation uses
> ``doc://com.apple.SwiftUI/documentation/SwiftUI/NavigationTransition/automatic`` instead.

---

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)