API Reference / @gtkx/animated / ControllerProps
Interface: ControllerProps<State, Item>
Props for Controller methods and constructor.
Extends
AnimationProps<State>
Type Parameters
State
Item
Item = undefined
Properties
cancel?
optionalcancel?:MatchProp<State>
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<State>
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?:Falsy|GoalValues<State>
immediate?
optionalimmediate?:MatchProp<State>
When true, props jump to their goal values instead of animating.
Inherited from
loop?
optionalloop?:LoopProp<ControllerUpdate<Lookup<any>,undefined>>
onChange?
optionalonChange?:OnChange<SpringValue<State>,Controller<State>,Item> | { [P in string | number | symbol]?: OnChange<SpringValue<State[P]>, Controller<State>, Item> }
Called once per frame when animations are active
Also accepts an object for per-key events
onPause?
optionalonPause?:OnPause<SpringValue<State>,Controller<State>,Item> | { [P in string | number | symbol]?: OnPause<SpringValue<State[P]>, Controller<State>, Item> }
onProps?
optionalonProps?:OnProps<State> | { [P in string | number | symbol]?: OnProps<State[P]> }
Called after an animation is updated by new props. Useful for manipulation
Also accepts an object for per-key events
onResolve?
optionalonResolve?:OnResolve<SpringValue<State>,Controller<State>,Item>
Called when the promise for this update is resolved.
onRest?
optionalonRest?:OnRest<SpringValue<State>,Controller<State>,Item> | { [P in string | number | symbol]?: OnRest<SpringValue<State[P]>, Controller<State>, Item> }
Called when the # of animating values hits 0
Also accepts an object for per-key events
onResume?
optionalonResume?:OnResume<SpringValue<State>,Controller<State>,Item> | { [P in string | number | symbol]?: OnResume<SpringValue<State[P]>, Controller<State>, Item> }
onStart?
optionalonStart?:OnStart<SpringValue<State>,Controller<State>,Item> | { [P in string | number | symbol]?: OnStart<SpringValue<State[P]>, Controller<State>, Item> }
Called when the # of animating values exceeds 0
Also accepts an object for per-key events
pause?
optionalpause?:MatchProp<State>
Pause all animations by using true, or some animations by using a key or an array of keys.
Inherited from
ref?
optionalref?:SpringRef<State>
reset?
optionalreset?:MatchProp<State>
Start the next animations at their values in the from prop.
Inherited from
reverse?
optionalreverse?:boolean
Swap the to and from props.