Swarm Button

NewPremium

Text rendered as particle swarm that scatters on hover and reforms using boid flocking behavior.

buttonsparticlesswarmboidflockingtext

Installation

Terminalbash
npx motion-primitives-website add swarm-button

Usage

swarm-button.tsxtsx
import { SwarmButton } from "@/components/buttons/premium-buttons";

<SwarmButton particleColor="#a855f7">
  HOVER
</SwarmButton>

Props

PropTypeDefaultDescription
children*string—Text to render as particles
particleColorstring#ffffffParticle color
classNamestring—Additional CSS classes
onClick() => void—Click handler

Related Components