---
title: "toolbarForegroundStyle(_:for:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/toolbarforegroundstyle(_:for:)"
---

# toolbarForegroundStyle(_:for:)

Specifies the preferred foreground style of bars managed by SwiftUI.

## Declaration

```swift
nonisolated func toolbarForegroundStyle<S>(_ style: S, for bars: ToolbarPlacement...) -> some View where S : ShapeStyle

```

## Discussion

Discussion This examples shows a view that renders the navigation bar with a blue foreground color. NavigationStack {     ContentView()         .navigationTitle("Blue")         .toolbarForegroundStyle(             .blue, for: .navigationBar) }

## See Also

### Styling a toolbar

- [toolbarBackground(_:for:)](swiftui/view/toolbarbackground(_:for:).md)
- [toolbarColorScheme(_:for:)](swiftui/view/toolbarcolorscheme(_:for:).md)
- [windowToolbarStyle(_:)](swiftui/scene/windowtoolbarstyle(_:).md)
- [WindowToolbarStyle](swiftui/windowtoolbarstyle.md)
- [toolbarLabelStyle](swiftui/environmentvalues/toolbarlabelstyle.md)
- [ToolbarLabelStyle](swiftui/toolbarlabelstyle.md)
- [SpacerSizing](swiftui/spacersizing.md)
