Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View modifier

foregroundColor(_:)

A view modifier that maps SwiftUI's foregroundColor.

iOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+
fun Modifier.foregroundColor(color: Color?): Modifier

Overview

Modifier.foregroundColor(color = Color.…)

This is the Kotlin form of SwiftUI View.foregroundColor(_:): SwiftUI documentation. In Swift it reads:

nonisolated func foregroundColor(_ color: Color?) -> some View

Topics

Overloads

fun Modifier.foregroundColor(color: Color?): Modifier
SwiftUI View.foregroundColor(_:)