Skip to content

    Browse components

    Word Pile

    A paragraph whose words tumble down and pile up with real physics on hover, click or view, then can be grabbed and tossed around.

    Open
    Customize

    hover
    click
    view
    auto

    Installation

    npx shadcn@latest add @glint-ui/word-pile

    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/word-pile.json

    Usage

    import { WordPile } from "@/components/ui/word-pile";
    
    <div className="h-96">
      <WordPile trigger="hover" highlightWords={["move", "ship"]} />
    </div>

    Props

    PropTypeDefaultDescription
    textstring"React components that move you. Drop them in, drag them around, and ship interfaces people remember."Paragraph to drop.
    highlightWordsstring[]["move","drag","ship","remember"]Words drawn in the accent color (punctuation ignored).
    trigger"hover" | "click" | "view" | "auto""hover"What drops the words. `auto` drops them right after mount.
    gravitynumber1Gravity strength.
    restitutionnumber0.4Bounciness.
    highlightColorstring"#a3e635"Accent color for highlighted words.
    classNamestring—Extra classes for the root element.