RepeatConfig
Sets how many times repeat() plays an animation and whether every other run goes backwards.
Usage
Animate through several keyframes.
This type is used by repeat
// Animate through several keyframes.
import { Box, keyframes, motion, repeat } from 'kuito';
const pulse = motion(1);
pulse.value = repeat(keyframes({ 0: 1, 50: 1.1, 100: 1 }, 600)); // one prop: an animation
const pop = keyframes({ 0: { opacity: 0, scale: 0.8 }, 100: { opacity: 1, scale: 1 } }, 300); // objects: an effect
<Box scale={pulse} enter={pop} />;Type declaration
export interface RepeatConfig {
/** How many times; Infinity (the default) repeats until interrupted. */
count?: number;
/** Run every other repetition backwards. */
reverse?: boolean;
onEnd?: AnimationCallback;
}Members 3
| Name | Type | Required | Description |
|---|---|---|---|
count | number | No | How many times; Infinity (the default) repeats until interrupted. |
reverse | boolean | No | Run every other repetition backwards. |
onEnd | AnimationCallback | No | — |
onEnd — method signatures
Signatures
(finished: boolean): voidParameters
| Name | Type | Required | Description |
|---|---|---|---|
finished | boolean | Yes | — |
Returns
void
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.