Delay

Fires complete after the defined interval.

Import

import { delay } from 'popmotion';

Usage

delay(100).start({
  complete: () => console.log('complete!')
});

Useful for delaying actions in a chain.

chain(
  delay(100),
  tween({ to: 400, duration: 500 })
);

Action methods

delay() returns:

  • start(update | { update, complete }): Starts the action and returns a subscription.

Subscription methods

delay().start() returns:

  • stop(): void

Hey! Did you find this article useful? Popmotion relies on contributions from the community to operate.