Component packs › Ferro › Filings Field

Filings Field

Thousands of iron filings swing round to follow the field of a magnet you drag with the cursor; click to flip it and a spin ripples out.

Filings Field is a backdrop from Ferro, a component pack with 7 components: Components that behave like magnets. Price: $5 for the whole pack.

Built with: real dipole field, spring filings, flip ripple.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Filings Field props

PropTypeDefaultDescription
heightnumber320Height in px (width follows the container). Default 320.
titlestringText shown over the field.
autoplaybooleanShowcase mode: the magnet wanders by itself until touched.

Methods on the ref

Use it in React

import FilingsField from './FilingsField';

<FilingsField />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Ferro

Good for: Micro-interactions.