Skip to content
animorio
IT
Back to the library

Dust particle background

Backgrounds, ScrollGSAP, Canvas, CSS onlyMediumCompressed weight: Demo 7.1 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

A particle background to scroll through, in minimal style: on a warm white, hundreds of thin dashes drift like dust in a room, behind the heading of a focus app. As you scroll the dust settles, from the heading out to the edges: each dash glides onto its point of a grid and turns level on a spring, one pixel past and back, while the heading gains weight and tightens. The pointer pushes the dashes aside and lights them cobalt.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Dust particle background" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Stillwork</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- a long section with a sticky stage: a field of tiny dashes drifts like dust in the air behind the heading;
       scrolling settles them, from the heading outwards, into an even grid of level dashes -->
  <main class="corsa" data-corsa>
    <section class="palco" data-palco>
      <canvas class="pulviscolo" aria-hidden="true" data-tela></canvas>

      <header class="testa">
        <p class="marchio" data-entra>Stillwork</p>
        <p class="testa__nota" data-entra>Deep work for small teams</p>
      </header>

      <div class="centro">
        <div class="titolo" data-titolo>
          <p class="occhiello" data-entra>Focus mode</p>
          <h1 class="titolo__testo" data-testo>Find your<br>focus.</h1>
          <span class="titolo__riga" aria-hidden="true" data-riga></span>
        </div>
      </div>

      <footer class="piede">
        <p class="piede__nota" data-entra>Scroll to let the dust settle</p>
        <p class="piede__lettura" data-entra>
          <span class="lettura__nome">Settled</span>
          <span class="lettura__valore" data-lettura>0</span><span class="lettura__unita">%</span>
        </p>
      </footer>
    </section>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/lenis@1.3.26/dist/lenis.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

21 values to change

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “Dust particle background” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

A long section with a still stage, the page background of an invented focus app, Stillwork. When it opens the dust appears little by little: thin ink dashes, each a few pixels long, drifting on a slow air current and turning slowly on themselves, some lighter and some darker like dust in the light. In the middle sits the heading, Find your focus., light and wide. As you scroll the dust settles: each dash has its own point on an even grid and its own threshold, higher the further it is from the heading, so order starts from the words and spreads out to the edges like a wave. Past its threshold, the dash glides onto its point and turns level on a measured spring, one pixel past and back; in line it breathes by half a pixel. Inside the oval of the heading the settled dashes almost vanish and leave the air to the words. The heading follows the settled dust with a slight delay: it goes from 300 to 640 in weight and tightens; once more than 90% is in line a cobalt rule draws itself underneath, one pixel too far. At the bottom a reading says how much dust has settled. The pointer pushes aside the dashes it brushes, which light up cobalt until the spring takes them home; a tap scatters them in a ring that settles back and gives the heading a small jolt. Scrolling back up, the dust lifts with a light push and starts drifting again.

How it works

The stage and the grid

The section is 320lvh tall and the stage inside is sticky, 100lvh tall. The grid has a point every PASSO px (tighter on small stages, wider on huge ones, so there are always a few hundred dashes) and each point has its own grain. Each grain has a scroll threshold: 0.12 plus ONDA times its distance from the heading, plus a little randomness.

The free dust

When free, the grain follows its own point drifting on a current made of three slow sine waves in x, y and t, so neighbours move almost together, at DERIVA px per second and slightly upwards; whoever leaves one side comes back from the other. The direction turns slowly, each at its own speed, and the light flickers a little.

The spring that settles it

When the progress passes the threshold the target becomes the grid point: a spring (MOLLA, stiffness and damping, damped close to 0.8) takes the grain there one pixel too far, and the same spring takes the angle to zero, that is level. There are two half steps per frame, so the spring stays stable even on long frames.

The heading that gains weight

Every frame counts the grains really settled (within 1.5 px of their point and almost level): that share is the reading at the bottom and the heading’s target, which follows it with a delay going from 300 to 640 in weight and from 112 to 94 in width. Past 90% the cobalt rule opens with back.out.

The pointer and the tap

The pointer moves the target of the grains within PUNTATORE px, not the grains: the spring does the rest, and any grain more than 4 px out of place is drawn in cobalt. A pointerdown gives a radial push to the grains within 2.2 times that radius, fading with distance, and the heading gives an elastic jolt.

Values to change

NameFileDefaultWhat it changes
PASSOscript.js26The distance between the grid points, in px.
TRATTOscript.js6The length of each dash, in px.
DERIVAscript.js14How fast the free dust drifts, in px per second.
ONDAscript.js0.55How much of the run order takes to travel from the heading to the edges.
MOLLAscript.js[70, 13]The spring each dash settles on: how stiff and how damped.
PUNTATOREscript.js90The radius within which the pointer pushes the dashes aside, in px.
SPESSOREscript.js1.2The thickness of the dashes, in px.

Try them in the Playground

When to use it

As the background of the first screen of a productivity or focus app, a team tool, a meditation or organisation service, a studio that brings order (archives, consulting, systems design), a landing page telling the move from chaos to order. The dash colour and the accent are set in the CSS.

On phones

The same animations with the sizes adapted: the grid tightens on the stage’s short side, the heading is sized on the height too and the small notes at the top and bottom give way to the reading alone. The finger pushes the dashes aside and a tap scatters them; the page still scrolls vertically.

With reduced motion

Nothing moves: the scattered dust and the grid in line are two still images that cross-fade as you scroll; the heading gains weight without moving, the cobalt rule fades in and the pointer pushes nothing aside.

Pitfalls

  • If the pointer pushes the grains instead of their target, the settled ones run off and never find their place again: the target moves and the spring does the rest.
  • When a free grain leaves one side and comes back from the other, the spring would pull it across the whole stage: in that case the grain jumps together with its point.
  • A fixed-step grid on a big screen makes thousands of dashes: the step widens so there are never more than about 1600.

Libraries

GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 7.1 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

Tested on 1 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All animations