# Magnetic Lines

> A field of hundreds of tiny lines that orient toward your cursor like iron filings around a magnet. Each line blends between a gentle wind-wave idle animation and a magnetic pull toward the mouse — closer lines point more aggressively and glow brighter. When idle, a simulated cursor orbits slowly so the preview is always alive. Supports content overlay as children. Faded edges, configurable spacing, line color, force radius, wave speed. Zero external dependencies — pure canvas.

- Author: [Yad Hakim](https://21st.dev/@dev.yadhakim)
- License: unknown
- Live preview: https://21st.dev/@dev.yadhakim/components/magnetic-lines

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/dev.yadhakim/magnetic-lines?api_key=$API_KEY_21ST"
```

Requires a 21st API key (generate one at https://21st.dev/mcp) passed as `API_KEY_21ST`. Free accounts get a limited number of installs per day; unlimited on a paid plan — see https://21st.dev/pricing.

Full component directory: https://21st.dev/llms.txt
