<!--
{
  "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/MatchedTransitionSourceConfiguration/shadow(color:radius:x:y:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI36MatchedTransitionSourceConfigurationPAAE6shadow5color6radius1x1yQrAA5ColorV_14CoreFoundation7CGFloatVA2MtF"
  },
  "title" : "shadow(color:radius:x:y:)"
}
-->

# shadow(color:radius:x:y:)

Applies the specified shadow effect to the matched transition source.

```
func shadow(color: Color = Color(.sRGBLinear, white: 0, opacity: 0.33), radius: CGFloat, x: CGFloat = 0, y: CGFloat = 0) -> some MatchedTransitionSourceConfiguration
```

## Parameters

`color`

The shadow’s color.

`radius`

A measure of how much to blur the shadow. Larger values
result in more blur.

`x`

An amount to offset the shadow horizontally from the view.

`y`

An amount to offset the shadow vertically from the view.

---

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)