<!--
{
  "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(duration:bounce:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI6SpringV8duration6bounceACSd_Sdtcfc"
  },
  "title" : "init(duration:bounce:)"
}
-->

# init(duration:bounce:)

Creates a spring with the specified duration and bounce.

```
init(duration: TimeInterval = 0.5, bounce: Double = 0.0)
```

## Parameters

`duration`

Defines the pace of the spring. This is approximately
equal to the settling duration, but for springs with very large
bounce values, will be the duration of the period of oscillation
for the spring.

`bounce`

How bouncy the spring should be. A value of 0 indicates
no bounces (a critically damped spring), positive values indicate
increasing amounts of bounciness up to a maximum of 1.0
(corresponding to undamped oscillation), and negative values
indicate overdamped springs with a minimum value of -1.0.

---

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)