TypewriterFromSentencesConfig

TYPE DEFINITION

The configuration for the typewriterFromSentences function.

Since 1.2.0

Properties

  • autoPlay Optional

    boolean

    Whether or not the animation will immediately start playing.

    When true the animation will start playing immediately, when false the animation will start when play() is called.

    Note: the animation will only start playing when there are actions defined.

    Defaults to true meaning that the animation will play instantly.

    Since 1.2.0

  • autoPlayAfter Optional

    number

    The time in milliseconds before the animation starts playing when autoPlay is true.

    Defaults to the delay config value when not set.

    Since 1.7.0

  • blinkAfter Optional

    number

    The time it takes until a cursor starts blinking again after the cursor was used.

    A cursor does not blink when it is used until after a certain time. So if you keep typing the cursor does not blink, until you stop typing for some "predefined amount" of time.

    The blinkAfter is what represents that 'predefined amount' of time, you can also say this is a debounce time.

    Note: when you set the blinkAfter to a number lower or equal to the delay of a TypewriterAction, it will negate the debounce. The effect is that all "CHANGED" events will have a "BLINKING" event. This might not "visually" affect your animation, but will make the Typewriter send extra events. If this happens it is technically as "misconfiguration" on your part, but the Typewriter will not throw any errors, since visually nothing bad happens.

    Defaults to after 250 milliseconds.

    Since 1.2.0

  • delay Optional

    number

    The delay in milliseconds between letters, meaning the speed at which to type.

    Defaults to 50ms

    Since 1.2.0

  • keepHistoryFor Optional

    number

    For how many items the history may contain in the Typewriter.

    Defaults to 0 meaning that it will not track history.

    Since 1.2.0

  • repeat Optional

    boolean | number

    Whether or not this animation repeats and how often.

    There are three ways to define repeat.

    1. When repeat is false or 1 it will never repeat the animation, the animation will run only once.
    2. When repeat is true it will repeat the animation forever.
    3. When repeat is a number it will repeat the animation for given number of times. If the number is 0 or a negative number is provided a error occurs.

    Defaults to false meaning that the animation will run once.

    Since 1.2.0

  • repeatDelay Optional

    number

    The time in milliseconds the animation is paused in between repeats.

    Defaults to 0 milliseconds, meaning an almost instant repeat.

    Since 1.2.0

  • sentenceDelay Optional

    number

    The delay milliseconds in between sentences, is not applied for the first sentence.

    Defaults to 2000ms

    Since 1.2.0

  • sentences

    string []

    The sentences the Typewriter should animate.

    Since 1.2.0

  • text Optional

    string

    The initial text the Typewriter starts with.

    Defaults to '' meaning that the Typewriter will not have an initial text.

    Since 1.2.0