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.
Inside, each shape has its own home spot and wanders inside its own dashed oval, at its own pace, so no two ever move together.
All in step moves every shape along the same path at the same time, like one sheet. Own paths gives every shape its own way and pace, so it looks alive.
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.
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.
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.