Back to components
ComponentEffectFree

Target Lock Cursor React component

A custom cursor of four corner brackets that roams freely, then snaps around whatever you point at — links, buttons or anything marked data-lock — resizing to its exact bounds with a quick focus squeeze and a label tag, like a camera locking on.

About the Target Lock Cursor component

Target Lock Cursor swaps the arrow for a small reticle of four corner brackets. As you move over links, buttons or anything you've marked with data-lock, the brackets jump out and frame that element exactly, with a quick focus squeeze and a little tag naming what you've locked onto.

It works inside one area of the page, so the rest of the site keeps its normal cursor, and it only appears for a mouse; touch and keyboard users get the page as usual.

When to use it

Use it for portfolios, creative studios, game and tech landing pages, or galleries where pointing at things should feel like aiming a camera.

Mark the meaningful things with data-lock and a short label; locking onto every word gets busy.

Installation

Add the Target Lock Cursor component to your project with the shadcn CLI. It lands in components/target-lock-cursor.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/target-lock-cursor

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install clsx tailwind-merge

More Effect components

Fluid Ink Cursor
Free
Orbiting Border Glow
Free
Photo Trail Cursor
Free
Magnetic Button
Free
Pixel Dissolve Transition
Free
Click Burst
Free