Skip to main content
.allowsTightening(isEnabled?: boolean)
isEnabled
boolean
default:"true"
Whether to allow the text to tighten its character spacing. Defaults to true.

Support

Usage

Allow text to compress before truncating

Text("A long title that should fit")
    .lineLimit(1)
    .allowsTightening()

Disable tightening

Text("Fixed spacing")
    .allowsTightening(false)

Notes

Text tightening reduces the inter-character spacing slightly to fit more text in the available width. It is applied before truncation but after the minimum scale factor (if set).

See Also