Skip to main content
.fontWeight(weight: FontWeight)
weight
FontWeight
required
The font weight to apply. See FontWeight for available values (e.g., "ultraLight", "thin", "light", "regular", "medium", "semibold", "bold", "heavy", "black").

Support

Usage

Semibold text

Text("Heading")
    .fontWeight("semibold")

Light text

Text("Subtitle")
    .fontWeight("light")

Combined with font style

Text("Heavy Title")
    .font("largeTitle")
    .fontWeight("heavy")

See Also