ForegroundStyle

The foreground style in the current context.

StructureiOS 13.0+macOS 10.15+tvOS 13.0+watchOS 6.0+ForegroundStyle in SwiftUI

Declaration

React
type ForegroundStyle = SwiftOpaque<'ForegroundStyle'>;
Swift
@frozen struct ForegroundStyle

Overview

You can also use ShapeStyle.foreground to construct this style.

From Apple’s SwiftUI documentation. Code samples there are Swift.

See also

More in Styles.