
Text · Free
Iron filings
Ink needles on paper trace a word or the Bot like iron filings; your cursor is a magnet that pulls them into its field.
Free on Gumroad: the download arrives in your inbox.
Details
- Category
- Text
- Plan
- Free
- Code
- React + Tailwind, TypeScript · 261 lines
- Files
- IronFilings.tsx
- Needs
- The Bot (installed with it)
- Agents
- MCP server and shadcn registry
About
Thousands of tiny ink needles on paper. At rest they lie along the outline of a word (or the StackD Bot's face), the way iron filings trace the lines around a magnet.
Your cursor is the magnet: the needles near it swing round and line up along its field, from one pole to the other, growing a little as they're magnetised. Move away and they ease back into the shape. Click and they jump, then settle back.
Finished like a figure in print: labels in the corners, a live readout of the field and the magnet drawn as a little bar magnet. One canvas, drawn only while something moves and only while it's on screen.
React + Tailwind, no other libraries (Bot.tsx is only there for the Bot's shape).
Install
With the shadcn CLI:
npx shadcn@latest add https://www.stackd.codes/r/iron-filings.jsonOr let your agent add it through the StackD MCP server:
claude mcp add --transport http stackd https://www.stackd.codes/mcpPrompt for your agent
Paste it into Claude Code, Cursor, Codex or VS Code once the MCP server is connected.
Add the StackD Iron filings component to this project. Use the StackD MCP server: call get_component with { "name": "iron-filings" }, write the files at the paths it gives and install any npm packages it lists. Then use it where it fits, following its README for the props, and keep its own styles.Use
- Copy
IronFilings.tsxandBot.tsxinto the same folder (for examplecomponents/). - Use it:
import { IronFilings } from './components/IronFilings'
<IronFilings text="HELLO" width={720} height={440} />
// The Bot's face, in dark
<IronFilings shape="bot" theme="dark" width={440} height={540} caption="The Bot, traced" />
Short words read best. For a still picture, a cover or a mock-up, hold the magnet in one place with magnet={{ x: 0.8, y: 0.25 }}.
In Next.js the files already start with 'use client'. In other React setups that line does nothing.
Options
| Prop | Default | What it does |
|---|---|---|
shape | 'word' | 'word' or 'bot' (the Bot's face) |
text | 'HELLO' | The word, when shape is 'word' |
spacing | 8 | Space between needles in px. Smaller is denser (and heavier to draw) |
reach | 50 | How far the magnet reaches, 0 to 100 |
theme | 'light' | 'light' (ink on paper) or 'dark' |
width / height | 560 / 360 | Size in px |
magnet | Hold the magnet at { x, y } (0 to 1 across and down), for covers and mock-ups | |
labels | true | The editorial finish: corner labels, the live readout and the bar magnet |
caption | 'Iron filings on paper' | The caption, bottom left ("" hides it) |
className | Extra classes |
Accessibility
The canvas is an image with a name ("HELLO, drawn in iron filings", or the Bot). The labels are hidden from screen readers. With reduced motion on, the needles turn straight to their place without swinging, and nothing keeps moving.
Colours from StackD
White #FFFFFF · Ink #141310 · Paper #F2F0EC · Wine #901919 · Olive #6C8544 · Ochre #BE9344
Licence
You can use it in personal and commercial projects. Don't resell or share the component on its own.


