Skip to content
animorio
IT
Back to the library

Scrolling teleprompter

Text, HoverGSAP, CSS onlyMediumCompressed weight: Demo 6.4 KBGSAP 28 KBFreeDownload the zip

The teleprompter of a video recording app: the script climbs slowly under the reading line, the line you are reading lights up, the word you have reached turns yellow and the ones already said go dim. Below, pause, a speed to raise and lower and “Mirror”, which flips the text for anyone shooting through glass.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Scrolling teleprompter" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Teleprompter</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- the teleprompter of a video recording app: the script runs under the reading line,
         the words light up as they get there, and speed, mirror and pause are at hand -->
    <section class="tp" data-tp data-playing="true" aria-label="Teleprompter">
      <header class="tp__head"><span class="tp__rec"><svg viewBox="0 0 16 16" aria-hidden="true"><rect x="1.500" y="4" width="9" height="8" rx="2"></rect><path d="m10.500 7 4-2v6l-4-2"></path></svg>Take 3</span><span class="tp__left"><b data-outleft>0:00</b> left</span></header>
      <div class="tp__view" data-view>
        <div class="tp__flip" data-flip>
          <p class="tp__text" data-text>Hi, I’m Noor, and this is the studio where we make Lumen. Today I want to show you three things we changed this winter. First, the editor opens twice as fast. Second, captions now write themselves while you talk. And third, you can read your script right here, without ever looking away from the lens. Set the speed to the way you speak, flip the text if you shoot through glass, and stop whenever you need a breath. When you are ready, press record, look up, and just talk to whoever is on the other side. That is all for today. Thank you for watching, and see you in the next one.</p>
        </div>
        <i class="tp__line" aria-hidden="true"><svg viewBox="0 0 8 12"><path d="M0 0l8 6-8 6Z"></path></svg><svg viewBox="0 0 8 12"><path d="M8 0 0 6l8 6Z"></path></svg></i>
      </div>
      <span class="tp__progress" aria-hidden="true"><i data-bar></i></span>
      <div class="tp__controls">
        <button class="tp__play" type="button" data-play aria-label="Pause"><svg viewBox="0 0 20 20" aria-hidden="true"><path class="tp__pause" d="M6.500 4.500v11M13.500 4.500v11"></path><path class="tp__tri" d="M6.500 4 16 10l-9.500 6Z"></path></svg></button>
        <div class="tp__speed" role="group" aria-label="Speed">
          <button type="button" data-speed="-1" aria-label="Slower"><svg viewBox="0 0 12 12" aria-hidden="true"><path d="M2.500 6h7"></path></svg></button>
          <span class="tp__x"><span class="tp__roll"><b data-outspeed>1.0</b></span>x</span>
          <button type="button" data-speed="1" aria-label="Faster"><svg viewBox="0 0 12 12" aria-hidden="true"><path d="M2.500 6h7M6 2.500v7"></path></svg></button>
        </div>
        <button class="tp__mirror" type="button" data-mirror aria-pressed="false"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 3v14M7 6 3 10l4 4M13 6l4 4-4 4"></path></svg><span>Mirror</span></button>
      </div>
    </section>
    <span class="live" aria-live="polite" data-live></span>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></path></svg>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

19 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “Scrolling teleprompter” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On black, a dark panel: at the top “Take 3” with a camera icon and the time left; in the middle a window where the script climbs by itself, large, with two small yellow arrows at the sides marking the reading line. The line passing between the arrows is full white, and inside it the word the reading has reached is yellow; the lines above, already said, are almost out and those below, still to say, half lit; at the top and bottom the text fades. A thin yellow line shows how much of the script has gone by. Below are three controls: the light round pause button, which stops the text and shows the play triangle (tapping the window does it too); the speed, with minus and plus and a figure rolling from 1.0x to 1.2x and 1.4x, while the time left is worked out again; and “Mirror”, which turns yellow and flips the text with a small bounce. At the end, the script starts over.

How it works

One number runs everything

On every frame the position grows by speed times elapsed time. From that number come the text’s offset, the bar, the time left and the word that has been reached.

Every word has its moment

The text is split into words. After measuring, every word knows which line it is on and how far along the line it starts: when the position reaches it, it becomes the current word, its line lights up and the lines before go out. The classes change only when the word changes.

Speed and mirror

Speed is a multiplier that changes in steps; the mirror is a horizontal scale from one to minus one on the text’s container, on a spring.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#ffd24aThe colour of the word being read, the reading line and the bar.
SPEEDscript.js30How many pixels per second the text moves at speed 1.0.
STEPscript.js0.2How much the speed changes on every tap of plus and minus.
READ_ATscript.js0.36How high in the window the reading line sits.

Try them in the Playground

When to use it

On the site or in the app of a tool for recording videos, podcasts, courses or presentations, to show the teleprompter; the same scroll with its lit word carries timed song lyrics, a guided reading or the long captions of a live stream.

On phones

The panel is at most 400 pixels wide and narrows with the screen; the text window is at most 204 pixels tall and never more than 44 per cent of the screen, and in a short window the lines move closer. The text wraps by itself and the words are measured again. The controls are at least 40 pixels tall.

With reduced motion

The text does not run by itself: it stands at its start, and the button (or a tap on the window) moves it on one line at a time, with the line and the word lit as usual. The mirror flips with no bounce. The demo’s pointer does not start.

Pitfalls

  • The words’ positions depend on how the text wraps: they are measured again when the window changes size and when the font has finished loading.
  • The words’ classes are rewritten only when the reached word changes, not on every frame.
  • The mirror flips the text’s container, not the window: the reading line and the fade stay where they are.
  • The whole text stays in the page as an ordinary paragraph, so a screen reader reads all of it without waiting for the scroll.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 6.4 KB; the libraries: GSAP 28 KB.

Testing

Tested on 28 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All animations