$ Animated Text

animatedasync

Four text animation effects: typewriter, gradient wave, shimmer/sparkle, and bouncing text with trail effects.

# Preview

animated text demo
Typewriter:
Hello! I'm typ
Hello! I'm typing this cha
Hello! I'm typing this character by character...
Gradient Wave:
Rainbow colors flowing
Shimmer:
Sarklng magical ext effct
Bouncing:
>>> BOUNCE <<<
>>> BOUNCE <<<
>>> BOUNCE <<<

# Usage

example.ts
import { typewriter, gradientWave, shimmer, bouncingText } from "@vr_patel/tui";

// Typewriter — characters appear one by one
await typewriter({ text: "Hello, world!", speed: 40, color: fg.brightGreen });

// Gradient wave — rainbow colors flow through text
await gradientWave({ text: "Rainbow text!", duration: 3000 });

// Shimmer — sparkle effect across text
await shimmer({ text: "Sparkle!", duration: 3000 });

// Bouncing text — text bounces side to side with trail
await bouncingText({ text: "BOUNCE", duration: 4000 });

# API

PropTypeDefaultDescription
textstringrequiredText to animate
speednumber30-80msAnimation frame interval
durationnumber3000-4000msTotal animation duration
colorstringvariesText color (typewriter only)
colors[r,g,b][]rainbowGradient colors (wave only)
cursorstring"▌"Cursor character (typewriter only)