Skip to content

Type Alias: SpringConfig ​

ts
type SpringConfig = object;

Physics parameters for spring-driven flights. When spring is provided on SharedHeroProps, it takes precedence over duration and easing.

Properties ​

damping? ​

ts
optional damping?: number;

Spring damping coefficient (c) on iOS (CASpringAnimation.damping) and converted to damping ratio on Android (SpringForce.dampingRatio).

Default Value ​

ts
22

mass? ​

ts
optional mass?: number;

Virtual mass attached to the spring (m). Supported natively on iOS (CASpringAnimation.mass); Android's SpringForce assumes unit mass (1).

Default Value ​

ts
1

stiffness? ​

ts
optional stiffness?: number;

Spring stiffness constant (k).

Default Value ​

ts
260

Released under the MIT License.