Usage

Move a value to a target

tsx
import { Box, Button, VStack, keyframes, motion, repeat, sequence, spring, timing } from 'kuito';

export function Pulse() {
  const scale = motion(1);

  return (
    <VStack gap={12}>
      <Box scale={scale} width={80} height={80} backgroundColor="#f97316" />
      <Button onPress={() => (scale.value = sequence(timing(120).to(1.2), spring().to(1)))}>
        Bump
      </Button>
      <Button onPress={() => (scale.value = repeat(keyframes({ 0: 1, 50: 1.1, 100: 1 }, 600)))}>
        Breathe
      </Button>
    </VStack>
  );
}

Signatures

Overload 1

ts
<T>(...animations: Animation<T>[]): Animation<T>

Type parameters

NameConstraintDefault
T——

Parameters

NameTypeRequiredDescription
...animationsAnimation<T>[]Yes—

Returns

Animation<T>

Overload 2

ts
(...effects: Effect[]): Effect

Parameters

NameTypeRequiredDescription
...effectsEffect[]Yes—

Returns

Effect

Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.