文字动效

一组文字动效原语,涵盖逐字揭示、加载态微光扫过与字母级瀑布切换。

文字揭示

text-reveal.tsx

按词或按字揭示文字,配合弹簧上滑与模糊过渡。

Motion that feelsconsidered.

Word by word, with a soft blur.

安装

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

API 参考

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.tsx

渐变光效在文字上扫过,用于加载态或强调效果。

Loading projects…Faster shimmer

安装

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

API 参考

as?
ElementType
span
duration?
number
2.5
className?
string

文字瀑布流

text-cascade.tsx

独立文字的逐字符老虎机式滚动切换——旧字母依次掉落,新字母从左到右落位。

Install skills

安装

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

API 参考

text
string

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

className?
string

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.