Shuffle(025)

Slot-machine reel flip animation rolling through randomized glyph strips on scroll or hover.

HoverScroll
Requires:gsap@gsap/react
Loading…

Installation

$npx kibo add shuffle

Usage

1import { Shuffle } from "@/components/kibo/shuffle/component";
2
3export default function Example() {
4 return (
5 <Shuffle />
6 );
7}

Props Reference

PropTypeDefaultDescription
textstring-The text content to display and animate.
classNamestring''Additional CSS classes for styling and layout.
styleReact.CSSProperties{}Controls the style for the component animation.
shuffleDirection'left' | 'right' | 'up' | 'down''up'Controls the shuffle direction for the component animation.
durationnumber0.45Duration of the animation in seconds or milliseconds.
maxDelaynumber0Controls the max delay for the component animation.
easestring'power3.out'GSAP or cubic-bezier easing curve for animation smoothing.
thresholdnumber0.1Controls the threshold for the component animation.
rootMarginstring'-100px'Controls the root margin for the component animation.
tag'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span''p'Controls the tag for the component animation.
textAlignReact.CSSProperties['textAlign']'center'Controls the text align for the component animation.
onShuffleComplete() => void-Controls the on shuffle complete for the component animation.
shuffleTimesnumber4Controls the shuffle times for the component animation.
animationMode'random' | 'evenodd''evenodd'Controls the animation mode for the component animation.
loopbooleanfalseControls the loop for the component animation.
loopDelaynumber0Controls the loop delay for the component animation.
staggernumber0.03Stagger delay in seconds between individual characters/elements.
scrambleCharsetstring'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*'Controls the scramble charset for the component animation.
colorFromstring-Controls the color from for the component animation.
colorTostring-Controls the color to for the component animation.
triggerOncebooleanfalseControls the trigger once for the component animation.
respectReducedMotionbooleantrueControls the respect reduced motion for the component animation.
triggerOnHoverbooleantrueControls the trigger on hover for the component animation.