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

# fill(style:)

Fills this shape with the foreground color.

## Declaration

```swift
nonisolated func fill(style: FillStyle = FillStyle()) -> some View

```

## Parameters

- `style`: The style options that determine how the fill renders.

## Return Value

Return Value A shape filled with the foreground color.

## See Also

### Filling a shape

- [fill(_:style:)](swiftui/shape/fill(_:style:).md)
