override

Controls the starting appearance of the text before the scramble animation begins.

Accepts

Value Description
true Scrambles the original text using the chars set
false Shows the original text as-is
'' Starts from blank
' ' Replaces characters with spaces
String Characters set (see the chars parameter)

Default

true

override code example

import { animate, scrambleText } from 'animejs';

const [ $p ] = utils.$('p');
const buttons = utils.$('button');

const overrides = [false, 'uppercase', '_'];

function play(i) {
  animate($p, {
    innerHTML: scrambleText({ override: overrides[i] }),
  });
}

buttons.forEach(($btn, i) => $btn.addEventListener('click', () => play(i)));
<div class="large row">
  <p class="text-s text-mono">Controls the starting appearance of the text before the scramble animation begins.</p>
</div>
<div class="medium row">
  <fieldset class="controls">
    <button>false</button>
    <button>'uppercase'</button>
    <button>'_'</button>
  </fieldset>
</div>