---
title: "matchedTransitionSource(id:in:configuration:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/matchedtransitionsource(id:in:configuration:)"
---

# matchedTransitionSource(id:in:configuration:)

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

## Declaration

```swift
nonisolated func matchedTransitionSource(id: some Hashable, in namespace: Namespace.ID, configuration: (EmptyMatchedTransitionSourceConfiguration) -> some MatchedTransitionSourceConfiguration) -> 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 doc://com.apple.SwiftUI/documentation/SwiftUI/Namespace variable to a doc://com.apple.SwiftUI/documentation/SwiftUI/View type and reading its value in the view’s body method.
- `configuration`: A closure that you can use to apply styling to the source.

## Discussion

Discussion The appearance of the source can be configured using the configuration trailing closure. Any modifiers applied will be smoothly interpolated when a zoom transition originates from this matched transition source. MyView()     .matchedTransitionSource(id: someID, in: someNamespace) { source in         source             .cornerRadius(8.0)     }

## See Also

### Defining matched transitions

- [matchedTransitionSource(id:in:)](swiftui/view/matchedtransitionsource(id:in:).md)
- [MatchedTransitionSourceConfiguration](swiftui/matchedtransitionsourceconfiguration.md)
- [EmptyMatchedTransitionSourceConfiguration](swiftui/emptymatchedtransitionsourceconfiguration.md)
