Skip to main content
.tracking(amount: MilliEm): Component
amount
MilliEm
required
The letter spacing in milli-em units. 1000 equals 1em (the width of the current font size). Use positive values to increase spacing or negative values to tighten.

Support

Usage

Wide letter spacing

Text("SPACED")
    .tracking(500)

Tight letter spacing

Text("Tight")
    .tracking(-200)

Heading with tracking

Text("FEATURED")
    .font("caption")
    .fontWeight("semibold")
    .tracking(800)
    .foregroundStyle(Color("gray"))
    .textCase("uppercase")

Notes

  • tracking uses milli-em units where 1000 = 1em. For example, tracking(500) at a 16pt font size adds 8pt of spacing between each character.
  • This is equivalent to CSS letter-spacing but uses a different unit scale.