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

# shadow(_:)

Returns a shape style that applies the specified shadow style to the current style.

## Declaration

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

```

## Parameters

- `style`: The shadow style to apply.

## Return Value

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

## Discussion

Discussion In most contexts the current style is the foreground, but not always. For example, when setting the value of the background style, that becomes the current implicit style. The following example creates a circle filled with the current foreground style that uses an inner shadow: Circle().fill(.shadow(.inner(radius: 1, y: 1)))

## See Also

### Configuring the default shape style

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