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?
optionalcancel?: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
config?
optionalconfig?: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
default?
optionaldefault?: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
delay?
optionaldelay?: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
from?
optionalfrom?: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?
optionalimmediate?: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
loop?
optionalloop?: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?
optionalonChange?: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?
optionalonPause?: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?
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?
optionalonRest?: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?
optionalonResume?: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?
optionalonStart?: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?
optionalpause?: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
reset?
optionalreset?: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
reverse?
optionalreverse?: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.