# Magnet Lines

> An interactive grid of lines responds to cursor movement, creating a magnetic field effect. Each line smoothly rotates to follow the cursor position, resulting in a dynamic and engaging visual pattern.  Features: 	•	Interactive cursor tracking 	•	Smooth line rotations 	•	Customizable grid dimensions 	•	Flexible sizing options 	•	Performance optimization 	•	Responsive design 	•	Custom styling support 	•	Dynamic angle calculations 	•	Hardware-accelerated animations 	•	Configurable initial state

- Author: [deleted_rb](https://21st.dev/@deleted_reactbits)
- Library: deleted_rb
- License: mit
- Tags: Background
- Live preview: https://21st.dev/@deleted_reactbits/components/magnet-lines

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/deleted_reactbits/magnet-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 · More like this: https://21st.dev/community/components/s/background.md
