Chalkboard

Text

Put the words that take turns in {braces|like|this}.

Type

Colour

Ground

Ground

Motion

Plays

Checking your unlocks…

About this effect

Chalkboard writes your sentence in chalk: the strokes are broken by the grain of the board, rough at the edges, a little dusty round them. The word that changes is written in coloured chalk, and when it is time for the next one it is wiped away with quick strokes of the eraser, chalk dust drifting down, and the next word is written in from left to right in another colour, a few specks falling from the tip as it goes. Like a real board, every wiped word leaves a faint smudge behind, so the ghosts of the last words linger under the new one.

Write the words in braces, Class is about {motion|colour|type}; each takes the next colour. They share one slot as wide as the longest, so the sentence never jumps, and the heading reads as the sentence with every word listed. The chalk is drawn on a canvas from the heading's own letters (font, size and line breaks are the page's), its grain worked out once.

Hold sets how long each word stays. A handwritten face suits it best; it suits education, workshops, cafes, menus and anything that teaches.

Formats
React, HTML
No dependencies
Built with
Canvas, over real text
Default font Caveat
Plays
Loop, Hover
Reduced motion
Respected
Shows the finished frame

Accessibility. One real heading that reads as the sentence with every word listed; the chalk is drawn on a canvas hidden from screen readers. Under reduced motion it stays on the first word.

Also known as chalk text effect, chalkboard text, handwritten word swap, chalk writing animation, blackboard text, erase and rewrite text.

Use it in anything you build, client work included, no credit needed. Don’t republish or resell the effect itself.

More word swap