Toggle Sidebar B
AppearanceLight & dark mode D

Shuffle

Animated text reveal where characters shuffle before settling.

Default

Every prop is wired to the controls underneath. Any change replays the animation, and the refresh button replays it on demand. Hover the text to shuffle it again.

Light previewReplay previewOpen in new tab

UI LIBRARY

Customize

Direction
Ease
Duration0.35s
Shuffle Times1
Stagger0.03s
Loop Delay0s

API Reference

Shuffle

PropTypeDefaultDescription
textstring""The text content to shuffle.
shuffleDirection"left" | "right" | "up" | "down""right"Direction the per-letter strip slides to reveal the final character.
durationnumber0.35Duration (s) of the strip slide per letter.
maxDelaynumber0Max random delay per strip when animationMode is "random".
easestring | Function"power3.out"GSAP ease for sliding and color tween.
thresholdnumber0.1Portion of the element that must enter view before starting.
rootMarginstring"-100px"ScrollTrigger start offset (px, %, etc.).
tag"h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span""p"HTML tag to render for the text container.
textAlignCSS text-align"center"Text alignment applied via inline style.
shuffleTimesnumber1How many interim scrambled glyphs to scroll past before the final char.
animationMode"evenodd" | "random""evenodd"Odd/even staggered strips or random per-strip delays.
loopbooleanfalseRepeat the shuffle indefinitely.
loopDelaynumber0Delay (s) between loop repeats.
staggernumber0.03Stagger (s) for strips in "evenodd" mode.
scrambleCharsetstring""Characters to use for interim scrambles; empty keeps original copies.
colorFromstringundefinedOptional starting text color while shuffling.
colorTostringundefinedOptional final text color to tween to.
triggerOncebooleantrueAuto-run only on first scroll into view.
respectReducedMotionbooleantrueSkip animation if user prefers reduced motion.
triggerOnHoverbooleantrueAllow re-playing the animation on hover after it completes.

Shuffle events

PropTypeDefaultDescription
shuffle-complete() => void-Emitted after a full run completes (and on each loop repeat).

Accessibility

Keyboard shortcuts and ARIA behavior.

  • GSAP SplitText adds aria-label to the element and hides the split pieces from assistive tech, so the text is read once.
  • With prefers-reduced-motion the text is shown as is, with no shuffle.