Text spacing - SwiftUI

In SwiftUI, text spacing can be achieved using a combination of modifiers:

  • lineSpacing: set spacing between lines
  • kerning: set spacing between characters
  • padding: simulate paragraph spacing if needed.
Text("SwiftUI Text Example")
    // Line spacing
    .lineSpacing(20)
    // Letter spacing
    .kerning(3) 
    // Simulate paragraph spacing
    .padding(.bottom, 10)