<!--
{
  "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/Spring/init(mass:stiffness:damping:allowOverDamping:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI6SpringV4mass9stiffness7damping16allowOverDampingACSd_S2dSbtcfc"
  },
  "title" : "init(mass:stiffness:damping:allowOverDamping:)"
}
-->

# init(mass:stiffness:damping:allowOverDamping:)

Creates a spring with the specified mass, stiffness, and damping.

```
init(mass: Double = 1.0, stiffness: Double, damping: Double, allowOverDamping: Bool = false)
```

## Parameters

`mass`

Specifies that property of the object attached to the end of
the spring.

`stiffness`

The corresponding spring coefficient.

`damping`

Defines how the spring’s motion should be damped due to the
forces of friction.

`allowOverDamping`

A value of true specifies that over-damping
should be allowed when appropriate based on the other inputs, and a
value of false specifies that such cases should instead be treated as
critically damped.

---

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)