fill

Fills this shape with a color or gradient.

ShapeView ModifieriOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+fill(_:style:) in SwiftUI

Declaration

React
compose().fill(
  content?: SwiftUI.ShapeStyle,
  options?: {
    style?: SwiftUI.FillStyle;
  }
)
Swift
@export(implementation) nonisolated func fill<S>(
    _ content: S = .foreground,
    style: FillStyle = FillStyle()
) -> FillShapeView<Self.Content, S, Self>
where S : ShapeStyle

Parameters

Return value

A shape filled with the color or gradient you supply.

See also

More in ShapeView modifiers.