Type Alias AnimateWAAPI
AnimateWAAPI: {
debounce?: number;
duration?: number;
enabled?: boolean;
event?: keyof HTMLElementEventMap;
keyframeOptions?: KeyframeAnimationOptions;
keyframes: Keyframe[] | PropertyIndexedKeyframes;
strategy?: "cancel" | "exclusive";
}
debounce?: number;
duration?: number;
enabled?: boolean;
event?: keyof HTMLElementEventMap;
keyframeOptions?: KeyframeAnimationOptions;
keyframes: Keyframe[] | PropertyIndexedKeyframes;
strategy?: "cancel" | "exclusive";
}
Type declaration
Optional
debounce?: numberAdd a debounce to incoming events in milliseconds. Consider using the
exclusive
strategy.Optional
duration?: numberDuration in milliseconds. Default value:
600
.Optional
enabled?: booleanIs the animation enabled. Default value:
true
.Optional
event?: keyof HTMLElementEventMapDOM event name to bind element to respond with the WAAPI animation. Default value:
click
.Optional
keyframeOptions?: KeyframeAnimationOptionsAn object containing one or more timing properties. When defined it is used instead of
duration
.keyframes: Keyframe[] | PropertyIndexedKeyframes
An array of keyframe objects or a keyframe object whose properties are arrays of values to iterate over.
Optional
strategy?: "cancel" | "exclusive"The scheduling strategy to take.
cancel
to cancel any current animation,exclusive
to skip scheduling an animation if one is currently running. Default value:cancel
.
Defines the options for the animateWAAPI action.