Typewriter

Types a phrase, holds it, deletes it, then the next. The caret blinks only while it waits. Text.

Open playground

We build calm interfaces.. springy buttons.. details that last.

About

Typewriter is a React component in the Text category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { Typewriter } from "@ashutoshswamy/smoui" and set phrases, typeSpeed, hold.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { Typewriter } from "@ashutoshswamy/smoui";

<p>We build <Typewriter phrases={["calm interfaces.", "springy buttons."]} /></p>

Props 3

phrases

Phrases to cycle through.

string[]
typeSpeed / deleteSpeed

Characters per second.

numberdefault 14 / 30
hold

Seconds to hold a finished phrase.

numberdefault 1.6