Skip to content

    Browse components

    Shuffle Text

    Each letter spins like a slot-machine reel and lands on its final character, on view and on hover.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/shuffle-text

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/shuffle-text.json

    Usage

    import { ShuffleText } from "@/components/ui/shuffle-text";
    
    <ShuffleText text="Jackpot" duration={900} stagger={45} />

    Props

    PropTypeDefaultDescription
    textstring"Jackpot"Final text.
    durationnumber900Ms each reel spins.
    staggernumber45Ms between reels starting.
    spinsnumber8Random glyphs per reel before landing.
    charactersstring"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$#&%"Glyphs used on the reels.
    shuffleOnHoverbooleantrueSpin again on every hover.
    classNamestring—Extra classes for the root element.