07.20 · Ambient & Background

Fireworks

Rockets rise and burst into glowing sparks that fall and fade. Best for celebrations.

Watch it

It moves by itself. Pause it to look closely, or turn on slow motion to see each part of the movement.

Try it

Change a setting and see the difference as it moves.

How often

Rarely keeps it calm behind text.

Colors

Each burst picks one color from the set.

Trails

Trails show the path each spark has flown.

More optionsFewer options

Burst shape

Willow sparks droop like the branches of a tree.

Copy the prompt

Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.

Add fireworks to [the dark section you want them over]. On a see-through canvas laid over the section, launch a rocket from the bottom every so often; it slows as it climbs and, at the top of its climb, bursts into many sparks that fly out in all directions. Slow the sparks a little on every frame, pull them gently down and fade them out, so each burst blooms, droops and dies away. For trails, cover the canvas with a faint see-through layer instead of clearing it, the same number of times per second on every screen. Use fewer sparks on phones. If the visitor has reduced motion turned on, show a still picture of the bursts. Match the settings listed below.

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 GitHub

What it is

The full explanation is in README.md.

Good for

  • Launch and event pages
  • Holiday greetings
  • Success screens
  • Game wins

Avoid on

  • Calm brands
  • Long reading pages