Magnetic DotsA dense grid of dots that get magnetically pulled toward the cursor, snapping back with a satisfying elastic bounce when you leave.

BackgroundsHero sectionPortfolioMarketing site

Add to your project

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/magnetic-dots
2

For dark mode, add the dark class to your <html> element:

Optional
<html class="dark">

Install with AI Canvas MCP

With AI Canvas MCP, your AI knows every component we ship. Ask for “a navigation component from AI Canvas” inside Claude Code, Codex, or Cursor and it can suggest you a few options, then install the one you like. Less typing, lower token cost, modern way to build.

Get MCP

About Magnetic Dots

Magnetic Dots is a dense grid of points that get pulled toward your cursor as if it were a magnet, and snap back with an elastic bounce when you leave. The whole interaction is a single canvas loop applying a falloff function to each dot, so the effect feels physical without any actual physics library. The visual is restrained but unmistakably tactile, which makes it a good fit behind portfolio hero copy, behind a marketing-page headline, or anywhere a page needs to react to attention.

Built with

CanvasTailwind CSS

More like this