Typewriter

About this component

Typewriter

Text typed out one character at a time behind a thin caret that keeps a slow pulse once the line is finished. The element keeps the whole string as its accessible name.

Usage

The import and the props worth knowing about, in one place.

import { Text6 } from "@/components/beste/component/text6";

<Text6
  as="h2"
  text="Come as you are."
  speed={45}          // ms per character
  delay={200}         // ms before the first one
  caret              // keep the caret after the last character
  className="font-serif text-5xl"
/>

Playground

Turn the props on the right; the snippet under them is what you would write to get what you see.

Usage
import { Text6 } from "@/components/beste/component/text6";

<Text6
  text="Come as you are."
  as="h2"
  className="px-6 text-center font-serif text-2xl font-normal leading-[1.1] tracking-[-0.02em] text-foreground md:text-3xl"
/>

Props

Read from the component's own type, so this cannot drift from what it accepts.

PropTypeDefaultDescription
text*stringThe text; it is typed out character by character
as"h1" | "h2" | "h3" | "p" | "span"
trigger"view" | "mount""view" (default) starts typing when scrolled into view; "mount" starts at once
speednumberMilliseconds per character
delaynumberMilliseconds before the first character
caretbooleanKeep the caret blinking after the last character
classNamestring

More Text components

View all Text

Nothing changesall at once.

Line Reveal

Lines of text that rise into view out of their own clipped rows, one after another, the way a heading is unmasked line by line.

Slow Wave

A word whose letters rise and fall on one slow, continuous swell, each a beat behind the last, like a line of type resting on water. Stays still when reduced motion is preferred.

Slow,onpurpose.

Ink Drying

Words that begin as soft, spread blots of ink, wide-set and out of focus, and dry into crisp, tightly set type one after another.

Letter Cascade

Short text whose characters arrive one by one out of a light blur, for eyebrows, labels and single words. The element keeps the whole string as its accessible name.

A

Circle Text

A line of text set around a circle that turns slowly, with room in the middle for an initial, an icon or a short word. A seal for corners, footers and hero edges.

Running Line

A single line of text that runs across its container without end, fading at both edges and pausing under the pointer. Small caps for announcements, tracked serif for statements.