API Reference / @gtkx/animated / SpringProps
Interface: SpringProps<T>
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>
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)
Configure the spring behavior for each key.
Inherited from
default?
optionaldefault?:boolean|SpringProps<T>
Override the default props with this update.
Inherited from
delay?
optionaldelay?:number| ((key) =>number)
Milliseconds to wait before applying the other props.
Inherited from
from?
optionalfrom?:GoalValue<T>
immediate?
optionalimmediate?:MatchProp<T>
When true, props jump to their goal values instead of animating.
Inherited from
loop?
optionalloop?:LoopProp<SpringUpdate<any>>
onChange?
optionalonChange?:EventProp<OnChange<SpringValue<T>,SpringValue<T>,undefined>>
Called when a spring has its value changed.
onPause?
optionalonPause?:EventProp<OnPause<SpringValue<T>,SpringValue<T>,undefined>>
onProps?
Called after an animation is updated by new props, even if the animation remains idle.
onRest?
optionalonRest?:EventProp<OnRest<SpringValue<T>,SpringValue<T>,undefined>>
Called when all animations come to a stand-still.
onResume?
optionalonResume?:EventProp<OnResume<SpringValue<T>,SpringValue<T>,undefined>>
onStart?
optionalonStart?:EventProp<OnStart<SpringValue<T>,SpringValue<T>,undefined>>
Called when an animation moves for the first time.
pause?
optionalpause?:MatchProp<T>
Pause all animations by using true, or some animations by using a key or an array of keys.
Inherited from
reset?
optionalreset?:MatchProp<T>
Start the next animations at their values in the from prop.
Inherited from
reverse?
optionalreverse?:boolean
Swap the to and from props.