# SwiftUI spring(): CSS linear() spring, stiffness 157.91 damping 20.73

> SwiftUI spring() as a CSS linear() spring: stiffness 157.91, damping 20.73, settles in 0.69 s, overshoots 1%. Copy the CSS and the Web Animations line.

Canonical: https://vawe.dev/springs/swiftui-spring
Last updated: 2026-11-04

Stiffness 157.91, damping 20.73 and mass 1 give a damping ratio of 0.825, so the spring is underdamped. It settles to within 0.1% in 0.69 s. It passes the end value by up to 1% at 0.442 s and crosses it 1 time.

A damping fraction of 0.825 is the documented default of spring(response:dampingFraction:blendDuration:).

| Measure | Value |
| --- | --- |
| Stiffness | 157.91 |
| Damping | 20.73 |
| Mass | 1 |
| Damping ratio | 0.825 (underdamped) |
| Settle time | 0.69 s |
| Overshoot | 1% |
| Crosses the end value | 1 |
| 50% of travel at | 0.122 s |
| 90% of travel at | 0.246 s |

## CSS linear()

```css
transition: translate 690ms linear(0, 0.0055, 0.0208, 0.0442, 0.074, 0.1088, 0.1475, 0.1891, 0.2325, 0.2771, 0.3222, 0.3672, 0.4116, 0.455, 0.4972, 0.5379, 0.5769, 0.6141, 0.6493, 0.6825, 0.7137, 0.7429, 0.77, 0.7952, 0.8185, 0.8399, 0.8595, 0.8774, 0.8937, 0.9085, 0.9218, 0.9338, 0.9445, 0.9541, 0.9626, 0.9701, 0.9767, 0.9825, 0.9875, 0.9919, 0.9956, 0.9987, 1.0014, 1.0036, 1.0054, 1.0068, 1.0079, 1.0088, 1.0094, 1.0099, 1.0101, 1.0102, 1.0102, 1.0101, 1.0098, 1.0096, 1.0092, 1.0088, 1.0084, 1.008, 1.0075, 1.0071, 1.0066, 1.0061, 1.0057, 1.0053, 1.0048, 1.0044, 1.004, 1.0037, 1.0033, 1.003, 1.0027, 1.0024, 1.0022, 1.0019, 1.0017, 1.0015, 1.0013, 1.0011, 1);
```

## Web Animations

```js
el.animate({ translate: ['0 0', '240px 0'] }, { duration: 690, easing: 'linear(0, 0.0055, 0.0208, 0.0442, 0.074, 0.1088, 0.1475, 0.1891, 0.2325, 0.2771, 0.3222, 0.3672, 0.4116, 0.455, 0.4972, 0.5379, 0.5769, 0.6141, 0.6493, 0.6825, 0.7137, 0.7429, 0.77, 0.7952, 0.8185, 0.8399, 0.8595, 0.8774, 0.8937, 0.9085, 0.9218, 0.9338, 0.9445, 0.9541, 0.9626, 0.9701, 0.9767, 0.9825, 0.9875, 0.9919, 0.9956, 0.9987, 1.0014, 1.0036, 1.0054, 1.0068, 1.0079, 1.0088, 1.0094, 1.0099, 1.0101, 1.0102, 1.0102, 1.0101, 1.0098, 1.0096, 1.0092, 1.0088, 1.0084, 1.008, 1.0075, 1.0071, 1.0066, 1.0061, 1.0057, 1.0053, 1.0048, 1.0044, 1.004, 1.0037, 1.0033, 1.003, 1.0027, 1.0024, 1.0022, 1.0019, 1.0017, 1.0015, 1.0013, 1.0011, 1)', fill: 'both' });
```

## In a vawe page

```js
import { spring, springDuration, springLinear } from '../../core/motion/springs.js';

const k = 157.91, d = 20.73;

// per-frame code (window.seek, vawe.onFrame): t is seconds since the move starts
const x = 240 * spring(t, k, d);

// CSS and Web Animations: 690 ms, the linear() string above
el.animate(
  { translate: ['0 0', '240px 0'] },
  { duration: springDuration(k, d) * 1000, easing: springLinear(k, d), fill: 'both' },
);
```

## Source of the numbers

spring(response: 0.5, dampingFraction: 0.825): the documented defaults. SwiftUI documentation read on 2026-11-03, Animation.spring(response:dampingFraction:blendDuration:) (https://developer.apple.com/documentation/swiftui/animation/spring(response:dampingfraction:blendduration:)). Conversion: stiffness = (2 pi / response)^2, damping = 4 pi x dampingFraction / response, with mass 1. The duration-and-bounce forms map to response = duration and dampingFraction = 1 - bounce, the same bounce mapping Motion documents "as SwiftUI does". Apple states bounce 0 is critically damped and bounce 1 is undamped.

## Related

- [SwiftUI .snappy](https://vawe.dev/springs/swiftui-snappy)
- [react-spring gentle](https://vawe.dev/springs/react-spring-gentle)
- [SwiftUI .bouncy](https://vawe.dev/springs/swiftui-bouncy)
- [react-spring default](https://vawe.dev/springs/react-spring-default)
- [All spring presets](https://vawe.dev/springs)
