<!--
{
  "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/Animation/interpolatingSpring(mass:stiffness:damping:initialVelocity:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI9AnimationV19interpolatingSpring4mass9stiffness7damping15initialVelocityACSd_S3dtFZ"
  },
  "title" : "interpolatingSpring(mass:stiffness:damping:initialVelocity:)"
}
-->

# interpolatingSpring(mass:stiffness:damping:initialVelocity:)

An interpolating spring animation that uses a damped spring
model to produce values in the range [0, 1] that are then used
to interpolate within the [from, to] range of the animated
property. Preserves velocity across overlapping animations by
adding the effects of each animation.

```
static func interpolatingSpring(mass: Double = 1.0, stiffness: Double, damping: Double, initialVelocity: Double = 0.0) -> Animation
```

## Parameters

`mass`

The mass of the object attached to the spring.

`stiffness`

The stiffness of the spring.

`damping`

The spring damping value.

`initialVelocity`

the initial velocity of the spring, as
a value in the range [0, 1] representing the magnitude of
the value being animated.

## Return Value

a spring animation.

---

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)