Text Animations

Text Type

A typewriter. Types a sentence, waits, deletes it and types the next, with a blinking cursor.
import { TextType } from "pleate/effects/text-type";

Cycling sentences

Book the flight.. Find a quiet hotel.. Leave the rest to us.

Type once

loop={false} stops on the last sentence.

$ npm install pleate

Props

text

One sentence, or several to cycle through.

string | string[]

typingSpeed / deletingSpeed

Milliseconds per character.

numberdefault 55 / 30

pause

Milliseconds a finished sentence stays.

numberdefault 1600

loop

Start over after the last sentence.

booleandefault true

startOnView

Wait until it is on screen.

booleandefault true

cursor / showCursor

The cursor mark.

string / booleandefault "|" / true

className

Classes for the root (type size, color).

string

Accessibility

  • Every sentence is read once, not letter by letter.
  • Reduced motion shows the first sentence complete, without a cursor.