---
title: "init(mass:stiffness:damping:allowOverDamping:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/spring/init(mass:stiffness:damping:allowoverdamping:)"
---

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

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

## Declaration

```swift
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.

## See Also

### Creating a spring

- [init(duration:bounce:)](swiftui/spring/init(duration:bounce:).md)
- [init(response:dampingRatio:)](swiftui/spring/init(response:dampingratio:).md)
- [init(settlingDuration:dampingRatio:epsilon:)](swiftui/spring/init(settlingduration:dampingratio:epsilon:).md)
