<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/minimumScaleFactor(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE18minimumScaleFactoryQr14CoreFoundation7CGFloatVF"
  },
  "title" : "minimumScaleFactor(_:)"
}
-->

# minimumScaleFactor(_:)

Sets the minimum amount that text in this view scales down to fit in the
available space.

```
nonisolated func minimumScaleFactor(_ factor: CGFloat) -> some View
```

## Parameters

`factor`

A fraction between 0 and 1 (inclusive) you use to
specify the minimum amount of text scaling that this view permits.

## Return Value

A view that limits the amount of text downscaling.

## Discussion

Use the `minimumScaleFactor(_:)` modifier if the text you place in a
view doesn’t fit and it’s okay if the text shrinks to accommodate. For
example, a label with a minimum scale factor of `0.5` draws its text in
a font size as small as half of the actual font if needed.

In the example below, the [`HStack`](/documentation/SwiftUI/HStack) contains a [`Text`](/documentation/SwiftUI/Text) label with a
line limit of `1`, that is next to a [`TextField`](/documentation/SwiftUI/TextField). To allow the label
to fit into the available space, the `minimumScaleFactor(_:)` modifier
shrinks the text as needed to fit into the available space.

```
HStack {
    Text("This is a long label that will be scaled to fit:")
        .lineLimit(1)
        .minimumScaleFactor(0.5)
    TextField("My Long Text Field", text: $myTextField)
}
```

![A screenshot showing the effect of setting a minimumScaleFactor on](images/com.apple.SwiftUI/SwiftUI-View-minimumScaleFactor@2x.png)

---

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)