---
title: "shadow(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/shapestyle/shadow(_:)-swift.method"
---

# shadow(_:)

Applies the specified shadow effect to the shape style.

## Declaration

```swift
func shadow(_ style: ShadowStyle) -> some ShapeStyle

```

## Parameters

- `style`: The shadow style to apply.

## Return Value

Return Value A new shape style that uses the specified shadow style.

## Discussion

Discussion For example, you can create a rectangle that adds a drop shadow to the red shape style. Rectangle().fill(.red.shadow(.drop(radius: 2, y: 3)))

## See Also

### Modifying a shape style

- [blendMode(_:)](swiftui/shapestyle/blendmode(_:)-swift.method.md)
- [opacity(_:)](swiftui/shapestyle/opacity(_:)-swift.method.md)
