Skip to main content

@microsoft/fast-animation > Animate

Animate class

Base animate type. This is extended by AnimateTo and AnimateFrom.

export default abstract class Animate 


(constructor)(element, options, effectTiming)Constructs a new instance of the Animate class


addKeyframes(keyframes: Array<Partial<Keyframe>>) => voidadds a set of keyframes to set of animation keyframes the animation should execute
cancel() => voidcancels the animation
effectTimingEffectTimingStores animation timing functions
finish() => voidfinishes the animation
keyframeEffectKeyframeEffectReturns the key frame effect object
keyframesKeyframe[]Returns the animation's keyframes
modeAnimationModeTracks if the animation should animate toward an elements natural position or away from it
onCancel() => voidCallback to call when the animation is canceled
onFinish() => void
optionsAnimateConfigStores animation options
pause() => voidpauses the animation
play() => voidplays the animation
reverse() => voidreverses an animation