<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/AttributeScopes/SwiftUIAttributes/TrackingAttribute",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:10Foundation15AttributeScopesO7SwiftUIE0D12UIAttributesV08TrackingB0O"
  },
  "title" : "AttributeScopes.SwiftUIAttributes.TrackingAttribute"
}
-->

# AttributeScopes.SwiftUIAttributes.TrackingAttribute

A key for the space added between every character of a run of attributed
text.

```
@frozen enum TrackingAttribute
```

## Overview

Tracking spreads a run out evenly, which suits a short label set in
capitals. Give a positive value to open the run up and a negative value
to tighten it:

```
var label = AttributedString("SOLD OUT")
label.tracking = 3

Text(label)
```

To adjust only the gap between particular pairs of letters, use
[`AttributeScopes.SwiftUIAttributes.KerningAttribute`](/documentation/Foundation/AttributeScopes/SwiftUIAttributes/KerningAttribute).

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`EncodableAttributedStringKey`](/documentation/Foundation/EncodableAttributedStringKey)

[`Sendable`](/documentation/Swift/Sendable)

[`Copyable`](/documentation/Swift/Copyable)

[`DecodableAttributedStringKey`](/documentation/Foundation/DecodableAttributedStringKey)

[`AttributedStringKey`](/documentation/Foundation/AttributedStringKey)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)