<!--
{
  "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/spring(duration:bounce:blendDuration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI9AnimationV6spring8duration6bounce13blendDurationACSd_S2dtFZ"
  },
  "title" : "spring(duration:bounce:blendDuration:)"
}
-->

# spring(duration:bounce:blendDuration:)

A persistent spring animation. When mixed with other `spring()`
or `interactiveSpring()` animations on the same property, each
animation will be replaced by their successor, preserving
velocity from one animation to the next. Optionally blends the
duration values between springs over a time period.

```
@export(implementation) static func spring(duration: TimeInterval = 0.5, bounce: Double = 0.0, blendDuration: Double = 0) -> Animation
```

## Parameters

`duration`

The perceptual duration, which defines the pace of the
spring. This is approximately equal to the settling duration, but
for very bouncy springs, 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.

`blendDuration`

The duration in seconds over which to
interpolate changes to the duration.

## 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)