Animation
TypeWriter
Typewriter text effect with blinking cursor. Types, pauses, deletes, and loops through multiple strings.
Import
import { TypeWriter } from "@sigil-ui/components";Preview
Usage
<TypeWriter words={["npx @sigil-ui/cli init", "sigil preset cobalt"]} />Custom speed
<TypeWriter
words={["Hello", "World"]}
speed={80}
deleteSpeed={30}
pauseDuration={2000}
cursor
/>No loop
<TypeWriter words={["Type once and stop"]} loop={false} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
words | string[] | — | Strings to type |
speed | number | 60 | Typing speed (ms/char) |
deleteSpeed | number | 40 | Deleting speed (ms/char) |
pauseDuration | number | 1500 | Pause after full word in ms |
loop | boolean | true | Loop through words |
cursor | boolean | true | Show blinking cursor |
Respects prefers-reduced-motion — shows first word immediately when reduced motion is preferred.