Text Animation

Animated text primitives for spring reveals, chromatic sweeps, shimmer loading states, letter-cascade swaps and character scrambles.

Text Scramble

text-scramble.tsx

A controlled character scramble that resolves changed text while keeping its final value accessible.

Inspecting the repository

Install

$ bunx --bun shadcn add @beui/text-scramble

API Reference

text
string

Final text revealed by the scramble animation.

duration?
number

Maximum animation duration in milliseconds.

glyphs?
string

Characters sampled while unresolved positions are scrambling.

ABCDEFGHJKLMNPQRSTUVWXYZ0123456789#%&@$?/
className?
string
style?
CSSProperties

Dia Text Animation

chromatic-text-reveal.tsx

A Dia-inspired text effect with a fixed sentence prefix and a cycling final word revealed by a colorful sweep.

Motion that feels natural.

Install

$ bunx --bun shadcn add @beui/chromatic-text-reveal

API Reference

prefix
string

Sentence fragment that remains fixed while the final word changes.

words
string[]

Words revealed one after another after the fixed prefix.

colors?
string[]

Colors used along the moving chromatic edge.

[ "#60a5fa", "#818cf8", "#c084fc", "#fb7185", "#fbbf24", ]
foregroundColor?
string

Final text color after the sweep passes.

var(--foreground)
duration?
number

Sweep duration in seconds.

1.2
delay?
number

Delay before the first sweep, in seconds.

0
pauseDuration?
number

Rest after a word finishes revealing, in seconds.

0.8
loop?
boolean

Returns to the first word after the final word.

true
startOnView?
boolean

Starts when the text enters the viewport.

true
once?
boolean

Only starts on the first viewport entry.

true
inViewMargin?
MarginType

IntersectionObserver root margin used by the viewport trigger.

className?
string

Text Reveal

text-reveal.tsx

Word or character reveal with spring slide-up and blur.

Motion that feelsconsidered.

Word by word, with a soft blur.

Install

$ bunx --bun shadcn add @beui/text-reveal

API Reference

text
string | string[]
as?
ElementType
span
className?
string
split?
"word" | "char"
word
stagger?
number
0.09
delay?
number
0
blur?
number
12
yOffset?
string | number
40%
spring?
{ stiffness?: number; damping?: number; mass?: number | undefined; } | undefined
once?
boolean
true
whileInView?
boolean
false

Text Shimmer

text-shimmer.tsx

Gradient sweep across text for loading or emphasis.

Loading projects…Faster shimmer

Install

$ bunx --bun shadcn add @beui/text-shimmer

API Reference

as?
ElementType
span
duration?
number
2.5
className?
string

Text Cascade

text-cascade.tsx

Letter-by-letter slot roll for standalone text — old letters drop away as new ones land, left to right.

Install skills

Install

$ bunx --bun shadcn add @beui/text-cascade

API Reference

text
string

Current text. Changing it cascades the letters to the new value.

className?
string

Updated