Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View modifier

fontWeight(_:)

A view modifier that maps SwiftUI's fontWeight.

iOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+
fun Modifier.fontWeight(weight: Font.Weight?): Modifier

Overview

Modifier.fontWeight(weight = Font.Weight.…)

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

nonisolated func fontWeight(_ weight: Font.Weight?) -> some View

Topics

Overloads

fun Modifier.fontWeight(weight: Font.Weight?): Modifier
SwiftUI View.fontWeight(_:)