Skip to content

API Reference / @gtkx/animated / SpringProps

Interface: SpringProps<T> ​

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:768

Use the SpringUpdate type if you need the to prop to exist. For function types, prefer one overload per possible to prop type (for better type inference).

The T parameter can be a set of animated values (as an object type) or a primitive type for a single animated value.

Extends ​

Type Parameters ​

T ​

T = any

Properties ​

cancel? ​

optional cancel?: MatchProp<T>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:899

Cancel all animations by using true, or some animations by using a key or an array of keys.

Inherited from ​

AnimationProps.cancel


config? ​

optional config?: Partial<AnimationConfig> | ((key) => SpringConfig)

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:886

Configure the spring behavior for each key.

Inherited from ​

AnimationProps.config


default? ​

optional default?: boolean | SpringProps<T>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:916

Override the default props with this update.

Inherited from ​

AnimationProps.default


delay? ​

optional delay?: number | ((key) => number)

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:890

Milliseconds to wait before applying the other props.

Inherited from ​

AnimationProps.delay


from? ​

optional from?: GoalValue<T>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:769


immediate? ​

optional immediate?: MatchProp<T>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:894

When true, props jump to their goal values instead of animating.

Inherited from ​

AnimationProps.immediate


loop? ​

optional loop?: LoopProp<SpringUpdate<any>>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:770


onChange? ​

optional onChange?: EventProp<OnChange<SpringValue<T>, SpringValue<T>, undefined>>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:783

Called when a spring has its value changed.


onPause? ​

optional onPause?: EventProp<OnPause<SpringValue<T>, SpringValue<T>, undefined>>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:784


onProps? ​

optional onProps?: EventProp<OnProps<T>>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:775

Called after an animation is updated by new props, even if the animation remains idle.


onRest? ​

optional onRest?: EventProp<OnRest<SpringValue<T>, SpringValue<T>, undefined>>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:789

Called when all animations come to a stand-still.


onResume? ​

optional onResume?: EventProp<OnResume<SpringValue<T>, SpringValue<T>, undefined>>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:785


onStart? ​

optional onStart?: EventProp<OnStart<SpringValue<T>, SpringValue<T>, undefined>>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:779

Called when an animation moves for the first time.


pause? ​

optional pause?: MatchProp<T>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:904

Pause all animations by using true, or some animations by using a key or an array of keys.

Inherited from ​

AnimationProps.pause


reset? ​

optional reset?: MatchProp<T>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:908

Start the next animations at their values in the from prop.

Inherited from ​

AnimationProps.reset


reverse? ​

optional reverse?: boolean

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:912

Swap the to and from props.

Inherited from ​

AnimationProps.reverse