Interface AnimateWAAPI
interface AnimateWAAPI {
debounce?: number;
duration?: number;
enabled?: boolean;
event?: keyof HTMLElementEventMap;
keyframeOptions?: KeyframeAnimationOptions;
keyframes: Keyframe[] | PropertyIndexedKeyframes;
strategy?: "exclusive" | "cancel";
}
debounce?: number;
duration?: number;
enabled?: boolean;
event?: keyof HTMLElementEventMap;
keyframeOptions?: KeyframeAnimationOptions;
keyframes: Keyframe[] | PropertyIndexedKeyframes;
strategy?: "exclusive" | "cancel";
}
Properties
Optional
debounce
debounce?: number
Add a debounce to incoming events in milliseconds. Consider using the exclusive
strategy.
Optional
duration
duration?: number
Duration in milliseconds. Default value: 600
.
Optional
enabled
enabled?: boolean
Is the animation enabled. Default value: true
.
Optional
event
DOM event name to bind element to respond with the WAAPI animation. Default value: click
.
Optional
keyframeOptions
An object containing one or more timing properties. When defined it is used instead of duration
.
keyframes
An array of keyframe objects or a keyframe object whose properties are arrays of values to iterate over.
Optional
strategy
strategy?: "exclusive" | "cancel"
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.
See