Shatter

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/button-shatter

About this component

A click breaks the button into 24 irregular triangular shards, each a clone of the face clipped with clip-path. They burst away from the click point in 3D, hang in the air for a beat with their own lighting, then fly back and lock together with a small snap.

Triggers

  • Click
  • 3D

Techniques

  • clip-path
  • 3D transform
  • Perspective
  • Event position
  • Filter

Difficulty

Advanced

Accessibility

Keyboard and screen readers

The shards are aria-hidden clones; the button keeps its own label.

Reduced motion

A click only dims the face briefly.

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

More buttons

See all
Split-FlapGet code
Swipe to ConfirmGet code
TicketGet code
TideGet code