Cursors

Magnetic Cursor

The cursor here is not a dot but a ring with inertia: it lags behind the hand, stretches along the movement and settles onto the nearest button, taking its shape.

React + Tailwind, shadcn-compatible: press “Copy for AI” and your Cursor or Claude Code agent installs it with the shadcn CLI.

What you can change

  • targets — the buttons in the field: label and shortcut
  • caption and the line at the bottom — the texts around the demo
  • pull — the magnet radius in pixels

A link for your AI agent: preview, code and instructions.

Preview

1440pxHost theme
Magnetic Cursor — The cursor here is not a dot but a ring with inertia: it lags behind the hand, stretches along the movement and settles onto the nearest button, taking its shape.

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.
AI
1Pick it here

put this on the home page as the hero:

https://vibeui.club/c/cursor-002?lang=en&theme=dark

2Paste into the chat
3Get it in your project

Not sure where to paste it? Step-by-step guide

Show the full instructions

What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.

Loading…

How to use

<Cursor002 targets={[{ label: "Open", hint: "⏎" }]} pull={110} />

A sample call. The agent installs the component itself from the registry via the “Copy for AI” link.

Settings

Magnet radius
pull · default: 90
Inertia
lag · default: 0.18
Stretch
stretch · default: 1
Accent
accent · default: theme colour
Pointer reaction
interactive · default: on

FAQ

How do I add Magnetic Cursor with Cursor or Claude Code?
Press “Copy for AI” on this page and paste it into your agent's chat. The instruction contains the shadcn CLI install command, the dependencies and what to keep, so the agent installs this exact component instead of recreating a lookalike.
What does Magnetic Cursor depend on?
No npm packages beyond React and Tailwind CSS.
What can I change in Magnetic Cursor?
Adapt: targets — the buttons in the field: label and shortcut; caption and the line at the bottom — the texts around the demo; pull — the magnet radius in pixels. Keep as installed: the local --vibeui-cursor-002-* palette — do not swap it for your theme tokens; cursor: none on the field: two cursors at once read as a rendering glitch; the spring in rAF rather than a CSS transition: the target changes mid-flight and a transition cannot follow.
Is Magnetic Cursor free?
The preview is open to everyone; the source is available with a PRO subscription.

For developers

npx shadcn@latest add https://vibeui.club/r/pro/cursor-002.json

This command needs a signed link: sign in and open “Component source” below — it issues a working link valid for 30 minutes. All install options

Technical notes

The field draws its own cursor and hides the native one with cursor: none. The spring runs in rAF rather than a CSS transition: a transition cannot change its target mid-flight, and the hand changes it constantly. Every frame the nearest button within the pull radius is found; it takes the ring over and hands it its own width, height and corner radius — the ring slips onto the target while the button itself lifts and takes the accent. With no target in reach the ring stretches along the movement and squeezes across it: the stretch is computed from the ring's own speed rather than from pointer events, because those arrive in bursts. Frames are computed only while the hand is inside the field and the spring has not settled. The theme comes from the surroundings through light-dark(), and prefers-reduced-motion turns the inertia off — the ring simply follows the hand.

Tags

  • cursor
  • magnetic
  • hover
  • spring
  • pointer
  • interaction
  • buttons
  • micro-interaction
Component source

The same file your agent installs. Here in case you would rather copy it by hand.

Loading…