Skip to content
Knsept
Free playbook

Typewriter rotator

Types, pauses, deletes, and cycles through phrases with a blinking caret.

JavaScriptUI Widgets Updated Sep 28, 2026
Live demo Reduced motion is on, so effects are toned down
<h2 class="typewriter">Build <span data-words='["faster","small tools","real code","for the web"]'></span></h2>

The caret is a pseudo-element on the span, so it follows the text automatically. Deleting is twice as fast as typing, which feels natural.

Phrases live in a data-words attribute as JSON, so you can reuse the script anywhere without touching it. With reduced motion on, it still types (text appearing in place isn't movement), but the caret stops blinking.

More from the library

Text effects live

Seamless marquee

An endless scrolling strip of logos or tags. Pure CSS loop with a pause button; slower, never stopped, with reduced motion.

Text effects live

Text scramble

A heading that "decodes" from random characters into the real words, one letter at a time.

Text effects live

Shimmer text

A headline with a band of light sweeping across it, using background-clip text. Pure CSS, a few lines.