<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ShapeStyle/foreground",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10ShapeStylePA2A010ForegroundD0VRszrlE10foregroundAEvpZ"
  },
  "title" : "foreground"
}
-->

# foreground

The foreground style in the current context.

```
@export(implementation) static var foreground: ForegroundStyle { get }
```

## Discussion

Access this value to get the style SwiftUI uses for foreground elements,
like text, symbols, and shapes, in the current context. Use the
[`foregroundStyle(_:)`](/documentation/SwiftUI/View/foregroundStyle(_:)) modifier to set a new foreground style for
a given view and its child views.

For information about how to use shape styles, see [`ShapeStyle`](/documentation/SwiftUI/ShapeStyle).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)