# Spring

# Spring

Artifact:[androidx.compose.animation:animation-core](https://developer.android.com/jetpack/androidx/releases/compose-animation)  
[View Source](https://cs.android.com/search?q=file:androidx/compose/animation/core/VectorizedAnimationSpec.kt+class:androidx.compose.animation.core.Spring)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)
Common/All
  - Cmn  

  ```
  object Spring
  ```

*** ** * ** ***

Physics class contains a number of recommended configurations for physics animations.

## Summary

|                                      ### Constants                                      |
|-----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|
| `const `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [DampingRatioHighBouncy](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Spring#DampingRatioHighBouncy())` = 0.2f` Damping ratio for a very bouncy spring.                               | Cmn |
| `const `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [DampingRatioLowBouncy](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Spring#DampingRatioLowBouncy())` = 0.75f` Damping ratio for a spring with low bounciness.                        | Cmn |
| `const `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [DampingRatioMediumBouncy](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Spring#DampingRatioMediumBouncy())` = 0.5f` Damping ratio for a medium bouncy spring.                         | Cmn |
| `const `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [DampingRatioNoBouncy](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Spring#DampingRatioNoBouncy())` = 1.0f` Damping ratio for a spring with no bounciness.                            | Cmn |
| `const `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [DefaultDisplacementThreshold](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Spring#DefaultDisplacementThreshold())` = 0.01f` Default cutoff for rounding off physics based animations | Cmn |
| `const `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [StiffnessHigh](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Spring#StiffnessHigh()) Stiffness constant for extremely stiff spring                                                    | Cmn |
| `const `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [StiffnessLow](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Spring#StiffnessLow())` = 200.0f` Stiffness constant for a spring with low stiffness.                                     | Cmn |
| `const `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [StiffnessMedium](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Spring#StiffnessMedium())` = 1500.0f` Stiffness constant for medium stiff spring.                                      | Cmn |
| `const `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [StiffnessMediumLow](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Spring#StiffnessMediumLow())` = 400.0f` Stiffness constant for medium-low stiff spring.                             | Cmn |
| `const `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [StiffnessVeryLow](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Spring#StiffnessVeryLow())` = 50.0f` Stiffness constant for a spring with very low stiffness.                         | Cmn |

## Constants

### DampingRatioHighBouncy

Cmn  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)  

```
const val DampingRatioHighBouncy = 0.2f: Float
```

Damping ratio for a very bouncy spring. Note for under-damped springs (i.e. damping ratio \< 1), the lower the damping ratio, the more bouncy the spring.  

### DampingRatioLowBouncy

Cmn  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)  

```
const val DampingRatioLowBouncy = 0.75f: Float
```

Damping ratio for a spring with low bounciness. Note for under-damped springs (i.e. damping ratio \< 1), the lower the damping ratio, the higher the bounciness.  

### DampingRatioMediumBouncy

Cmn  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)  

```
const val DampingRatioMediumBouncy = 0.5f: Float
```

Damping ratio for a medium bouncy spring. This is also the default damping ratio for spring force. Note for under-damped springs (i.e. damping ratio \< 1), the lower the damping ratio, the more bouncy the spring.  

### DampingRatioNoBouncy

Cmn  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)  

```
const val DampingRatioNoBouncy = 1.0f: Float
```

Damping ratio for a spring with no bounciness. This damping ratio will create a critically damped spring that returns to equilibrium within the shortest amount of time without oscillating.  

### DefaultDisplacementThreshold

Cmn  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)  

```
const val DefaultDisplacementThreshold = 0.01f: Float
```

Default cutoff for rounding off physics based animations  

### StiffnessHigh

Cmn  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)  

```
const val StiffnessHigh: Float
```

Stiffness constant for extremely stiff spring  

### StiffnessLow

Cmn  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)  

```
const val StiffnessLow = 200.0f: Float
```

Stiffness constant for a spring with low stiffness.  

### StiffnessMedium

Cmn  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)  

```
const val StiffnessMedium = 1500.0f: Float
```

Stiffness constant for medium stiff spring. This is the default stiffness for spring force.  

### StiffnessMediumLow

Cmn  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.1.0)  

```
const val StiffnessMediumLow = 400.0f: Float
```

Stiffness constant for medium-low stiff spring. This is the default stiffness for springs used in enter/exit transitions.  

### StiffnessVeryLow

Cmn  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)  

```
const val StiffnessVeryLow = 50.0f: Float
```

Stiffness constant for a spring with very low stiffness.