Particle Text

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/button-particle-text

About this component

The label is redrawn from every inked pixel of the word, one canvas particle each, springing to its home. The cursor brushes the particles aside like dust and a click blows the word apart, weakening the spring for a moment so it drifts before pulling back together.

Triggers

  • Hover
  • Click
  • Mouse tracking
  • Spring

Techniques

  • requestAnimationFrame
  • Spring
  • Mouse tracking
  • Event position
  • Text animation

Difficulty

Advanced

Accessibility

Keyboard and screen readers

The real label stays in the DOM (made transparent) for screen readers and as the no-script fallback.

Reduced motion

The canvas is never used.

Use it in anything you build, commercial and client work included. Licence

More buttons

See all
Pull CordGet code
ShatterGet code
Split-FlapGet code
Swipe to ConfirmGet code