05.19 · Text & Typography

Text Particles

A word of dots scatters from your pointer and springs back. Best for intros.

Hover it

Move your pointer through the word, drag a finger across it (or Tab to it and use the arrow keys), or press Show me.

Try it

Change a setting, then try it again or press Show me.

Dot size

Smaller dots sit closer together, so the letters look finer.

How far they scatter

How wide a gap the pointer opens in the word.

Colors

The colors across the word, from left to right.

More optionsFewer options

How fast they come back

How quickly the dots spring back into the letters.

Short words work best, up to 10 letters.

Copy the prompt

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

Add a text particle effect to [the word or short title you want to animate]. Sample the word's pixels from a hidden canvas on an even grid, placing a dot wherever a letter covers it. Push the dots near the pointer away, so they glow as they fly, and tie each to its home with a spring, so it flies back with a slight wobble once the pointer moves on. Run one frame loop that moves by elapsed time, stop it once every dot is home, and draw fewer dots on phones. On touch screens, a dragged finger pushes the dots the same way. With reduced motion turned on, keep the dots still and only light up those near the pointer. 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

  • Hero titles
  • Page intros
  • Portfolios
  • Launch pages

Avoid on

  • Long text
  • Small text