Typing Flow Docs
  • Introduction
    • Get started
    • Configuration
    • Commands
      • text
      • backspace
      • del
      • cursorLeft
      • cursorRight
      • delay
      • home
      • end
    • Examples
  • Features
    • Renderers
    • Hooks
  • Plugins
    • chain
Powered by GitBook
On this page
  1. Plugins

chain

Plugin for creating linked animations. That is, when one ends, the next one begins.

Be careful with looping animations when using chain

Usage

import { TypingFlow } from "typing-flow";
import { chain } from "typing-flow/plugins";

const flow1 = new TypingFlow({...}).commands([...]);
const flow2 = new TypingFlow({...}).commands([...]);
const flow3 = new TypingFlow({...}).commands([...]);

// chainedFlow === flow1
const chainedFlow = chain(flow1, flow2, flow3);

chainedFlow.start();

chain returns the first flow passed. This must be remembered when using.

PreviousHooks

Last updated 3 months ago