Skip to content
arrie.dev Templates

Animations

Iron Filings

A canvas field of hairlines that turns towards the pointer. One file, no library.

R690

Once. Yours to keep

Get this template

The shape of it, not a screenshot

What it is

A grid of short lines drawn on a canvas. Each one turns to face the pointer and shortens with distance, so the field reads like filings around a magnet. It is about 200 lines of plain JavaScript, sized to its container and redrawn on resize, with nothing else behind it.

It runs only while it is on screen: an IntersectionObserver stops the loop when the section scrolls out, and the field eases back to rest when the pointer leaves. Density, line length, colour and stiffness are constructor options. On a touch screen it drifts slowly on its own rather than chasing a finger.

Meant as a hero background or a section divider on a studio, developer or product page, sitting behind text rather than in front of it. It is the wrong choice if the page already does heavy canvas work, or if you need the motion to respond to specific elements — it knows about the pointer and nothing else. Under prefers-reduced-motion it draws one static frame and never starts the loop.

Included

What you get

  • field.js, plain canvas, no dependencies
  • options for density, line length, stiffness and colour
  • pauses off screen, eases to rest when the pointer leaves
  • touch fallback with slow unattended drift
  • single static frame render for reduced motion
  • two presets: dense hairline grid and sparse dot field
How it works

After you buy

  1. 01 You message me On WhatsApp. Tell me which one and where it is going.
  2. 02 I set it up for you Your words, your colours, your logo dropped in — or the raw files if you would rather do it yourself.
  3. 03 It goes live On your hosting or on mine. Either way it ends up in your own account.
  4. 04 It is yours The whole thing, with nothing to renew and nothing tied back to me.