---
title: "fill(_:style:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/shape/fill(_:style:)-3y2ud"
---

# fill(_:style:)

Fills this shape with a color or gradient.

## Declaration

```swift
nonisolated func fill<S>(_ content: S = .foreground, style: FillStyle = FillStyle()) -> _ShapeView<Self, S> where S : ShapeStyle
```

## Parameters

- `content`: The color or gradient to use when filling this shape.
- `style`: The style options that determine how the fill renders.

## Return Value

Return Value A shape filled with the color or gradient you supply.
