<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/TextVariantPreference",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI21TextVariantPreferenceP"
  },
  "title" : "TextVariantPreference"
}
-->

# TextVariantPreference

A protocol for controlling the size variant of text views.

```
protocol TextVariantPreference
```

## Topics

### Type Properties

[`static var fixed: FixedTextVariant`](/documentation/SwiftUI/TextVariantPreference/fixed)

The default text variant preference. It always chooses the largest available
variant.

[`static var sizeDependent: SizeDependentTextVariant`](/documentation/SwiftUI/TextVariantPreference/sizeDependent)

The size dependent preference allows the text to take the available space into
account when choosing the size variant to display.

## Relationships

### Conforming Types

[`SizeDependentTextVariant`](/documentation/SwiftUI/SizeDependentTextVariant)

[`FixedTextVariant`](/documentation/SwiftUI/FixedTextVariant)

---

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)