05.15 · Text & Typography

Highlighter Sweep

A marker sweeps in behind the key words, one after another. Best for key points.

Watch it

It plays by itself. Turn on slow motion to see each part of the movement.

Readers skim first. A marker sweeps behind the words that matter, one phrase at a time, so the main idea stands out at a glance.

Try it

Change a setting and the animation plays again.

Marker color

Light colors keep the dark words easy to read.

Speed

How long the marker takes to cross each phrase.

How much it covers

The lower half reads like a thick underline.

Copy the prompt

Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.

Add a highlighter sweep to [the key words in your paragraph or quote]. Behind each key phrase, a band of marker color grows from left to right, as if drawn with a highlighter pen, and the phrases are marked one after another in reading order. Draw the band behind the text, never over it, and grow it by scaling it from its left edge, so the words never move or reflow. When a phrase wraps onto a second line, sweep each line in turn, as one continuous stroke. Keep the words dark enough to read on the marker color. If the visitor has reduced motion turned on, fade the highlights in instead of sweeping them. Match the settings listed below.

Replace the words in brackets with your own element. Your settings are added at the end.

Free and open source. If this helped, a star on GitHub helps other people find it.

Star on GitHub

What it is

The full explanation is in README.md.

Good for

  • Key points
  • Quotes
  • Headlines
  • Study notes

Avoid on

  • Long paragraphs
  • Too many words