<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ContentTransition/numericText(value:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17ContentTransitionV11numericText5valueACSd_tFZ"
  },
  "title" : "numericText(value:)"
}
-->

# numericText(value:)

Creates a content transition intended to be used with `Text`
views displaying numbers.

```
static func numericText(value: Double) -> ContentTransition
```

## Parameters

`value`

the value represented by the `Text` view being
animated. The difference between the old and new values
when the text changes will be used to determine the
animation direction.

## Return Value

a new content transition.

## Discussion

The example below creates a text view displaying a particular
value, assigning the same value to the associated transition:

```
Text("\(value)")
    .contentTransition(.numericText(value: value))
```

---

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)