Skip to content
Interactive

IronFilings

A bar magnet on a sheet dusted with thousands of iron filings. Each filing turns along the true field of the two poles and stays where it lay when the magnet moves on, so the sheet keeps a trace. Click turns the magnet, arrows move it.

Download
  • React
  • Tailwind CSS v4
  • motion

Props

NameTypeDefaultWhat it does
paperstring"#efe6d3"Sheet colour.
inkstring"#2b2622"Filing colour.
spacingnumber7Pixels between filings. Smaller is denser, capped at 9000 filings.
labelstringDescribes the keysRead out by screen readers.
classNamestring"h-80 w-full"Set a height and width here; the sheet fills them.