repeat
Run animation again and again, forever by default.
Usage
Animate through several keyframes.
// 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} />;Signatures
<T>(animation: Animation<T>, config?: RepeatConfig): Animation<T>Type parameters
| Name | Constraint | Default |
|---|---|---|
T | — | — |
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
animation | Animation<T> | Yes | — |
config | RepeatConfig | No | — Default: {} |
Returns
Animation<T>
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.