02.14 · Entrance & Exit
Shatter Effect
Breaks into pieces that fly apart and fade. Best for galleries and bold exits.
Watch it
It plays by itself. Turn on slow motion to follow each piece as it flies.
Northern LightsPhoto 1 of 3
Desert DunesPhoto 2 of 3
Ocean CovePhoto 3 of 3
Inside, the lines show where the card will break, the ring where it is hit, and the arrows where the pieces go; the nearest pieces fly first.
Plain fade swaps the photos with a simple fade; Shatters breaks the old one into pieces that fly apart as the next fades in. With Loop off, both rest part way through.
Try it
Change a setting and the animation plays again.
Number of pieces
More pieces look like thinner glass; phones cut Many a little coarser.
Breaks from
The break starts there, and the nearest pieces fly first.
Gravity
With none, the pieces drift away instead of falling.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a shatter effect to [the card or picture you want to break]. When it plays, the card breaks into uneven pieces that burst away from the point of impact, each turning as it flies and fading out, while the next card fades in behind them. Make each piece a copy of the whole card trimmed to its own shape, so together they look exactly like the card until they move, and launch the pieces nearest the impact first. Move and turn the pieces rather than resizing them so it stays smooth, and remove them once they have faded. If the visitor has reduced motion turned on, fade the card out and the next one in, with no pieces. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.