easeUI

Text Animation

One component, three ways to animate text: a scramble that resolves into place, a word or character reveal out of a blur, and a loading shimmer sweep.

Inspecting the repository

Installation

$ bunx --bun shadcn add @easeui/text-animation

API reference

PropTypeDefaultDescription
variant"scramble" | "reveal" | "shimmer"-Which animation runs.
text?string | {}-Text to animate. Reveal accepts an array to render each entry as its own line. Required for scramble and reveal.
children?any-Content to animate. Shimmer takes children instead of `text`, so it can wrap rich markup.
className?string--
duration?number-Scramble: max duration in milliseconds, default 900. Shimmer: seconds per sweep, default 2.5.
glyphs?string-Scramble only. Characters sampled while unresolved positions are scrambling.
as?any-Reveal only. Element the lines render inside. Default span.
split?"word" | "char"-Reveal only. Splits each line into words or characters. Default word.
stagger?number-Reveal only. Delay between each word or character, in seconds. Default 0.09.
delay?number-Reveal only. Delay before the first element, in seconds. Default 0.
blur?number-Reveal only. Starting blur, in pixels. Default 12.
yOffset?string | number-Reveal only. Starting vertical offset. Default "40%".
spring?{ stiffness?: number; damping?: number; mass?: number | undefined; } | undefined-Reveal only. Switches from the default tween to a spring with these physical params.
once?boolean-Reveal only. With whileInView, only plays the first time it enters view. Default true.
whileInView?boolean-Reveal only. Reveals when scrolled into view instead of on mount. Default false.

Updated