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

# fill(_:style:)

Fills this shape with a color or gradient.

## Declaration

```swift
nonisolated func fill<S>(_ content: S = .foreground, style: FillStyle = FillStyle()) -> FillShapeView<Self.Content, S, Self> 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.

## See Also

### Modify the shape

- [stroke(_:style:antialiased:)](swiftui/shapeview/stroke(_:style:antialiased:).md)
- [stroke(_:lineWidth:antialiased:)](swiftui/shapeview/stroke(_:linewidth:antialiased:).md)
- [strokeBorder(_:style:antialiased:)](swiftui/shapeview/strokeborder(_:style:antialiased:).md)
- [strokeBorder(_:lineWidth:antialiased:)](swiftui/shapeview/strokeborder(_:linewidth:antialiased:).md)
