Skip to content

    Browse components

    Swarm Word

    Thousands of tiny particles swarm together to spell a word, burst away from the cursor and spring back into place.

    Glint
    Open
    Customize

    Installation

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

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

    Usage

    import { SwarmWord } from "@/components/ui/swarm-word";
    
    <div className="relative h-80">
      <SwarmWord text="Glint" />
    </div>

    Props

    PropTypeDefaultDescription
    textstring"Glint"Text the particles form.
    particleSizenumber2.2Particle size, in px.
    gapnumber4Sampling step in px; smaller means more particles.
    colorstring"#bef264"First gradient color.
    secondaryColorstring"#22d3ee"Second gradient color.
    sparkColorstring"#ffffff"Color of particles while they fly.
    repelRadiusnumber90Pointer push radius, in px.
    repelStrengthnumber5How hard the pointer pushes.
    returnSpeednumber0.06Spring pull back home.
    classNamestring—Extra classes for the root element.