Typewriter Text

Text types itself on screen character by character, with an optional blinking cursor.

Expression Code
// Typewriter Text
// Apply to Source Text
txt = "Your text here"; // The text to type out
speed = 12; // Characters per second
startDelay = 0; // Seconds to wait before typing begins
cursor = "|"; // Cursor character ("" for none)
blinkRate = 2; // Cursor blinks per second
t = time - inPoint - startDelay;
chars = Math.max(0, Math.floor(t * speed));
visible = txt.substr(0, chars);
if (cursor != "" && chars <= txt.length) {
blink = Math.sin(t * blinkRate * Math.PI * 2) > 0 ? cursor : "";
visible + blink;
} else {
visible;
}
Apply to a text layer's Source Text property. 1. Create a text layer 2. Alt/Option-click the Source Text stopwatch 3. Paste this expression 4. Change txt to your message and set speed Typing starts at the layer's in point (plus startDelay), so trimming or sliding the layer bar retimes the reveal automatically. The cursor blinks while typing and disappears once the text is complete.
Back to Text & Numbers