Skip to content

    Browse components

    Bead Bin

    Glossy colored balls tumble in with gravity, collide and pile up; sweep the cursor through to shove them around. Canvas 2D.

    Bead Bin

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/bead-bin

    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/bead-bin.json

    Usage

    import { BeadBin } from "@/components/ui/bead-bin";
    
    <div className="relative h-96">
      <BeadBin count={60} />
    </div>

    Props

    PropTypeDefaultDescription
    countnumber60Number of balls.
    colorsstring[]["#c6ff3d","#22d3ee","#a78bfa","#f472b6","#fbbf24"]Ball colors.
    sizenumber1Ball size multiplier.
    gravitynumber1Gravity multiplier; 0 floats.
    bouncenumber0.7Bounciness.
    interactivebooleantrueThe cursor shoves the balls.
    cursorRadiusnumber90Px radius of the cursor's push.
    classNamestring—Extra classes for the root element.