07.10 · Ambient & Background

Floating Elements

Small shapes drift slowly, each on its own path. Best for hero backgrounds.

Watch it

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

Floating elements
No two shapes move together
Each shape follows its own slow path, so the motion never looks mechanical.

Try it

Change a setting and see the difference as it moves.

Number of shapes

5 to 12 shapes feels calm; more gets busy.

Speed

How fast the shapes drift.

How far they drift

How far each shape wanders from its place.

More optionsFewer options

Shapes

The kind of shapes that float.

Colors

The set of colors the shapes use.

Each shape slowly spins as it drifts.

Each shape slowly brightens and dims.

Shapes near your pointer or finger slide aside.

Copy the prompt

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

Add floating shapes to [the section you want a gentle moving background behind]. Scatter a handful of small, see-through circles, squares or rings, and move each one slowly around its own starting point on a smooth, looping path, giving every shape its own speed, distance and starting point so no two ever move in step. Keep them behind the content and let clicks pass through. When the settings include it, shapes slide away from the pointer, or from a finger on touch screens. If the visitor has reduced motion turned on, keep the shapes still. 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

  • Hero backgrounds
  • Landing pages
  • Onboarding screens
  • Empty states

Avoid on

  • Busy layouts
  • Long reading pages