# Reticle — Cursor Effect for React

> A target-bracket cursor: four neutral corner brackets with bright white inner edges ride the pointer, then snap to frame any element matching a selector with an overshoot-then-bite clamp, a single white spark at each corner on contact, and a soft hairline frame while locked. Scoped or global, never follows coarse pointers; idles on its own when untouched, touring the targets.

- Page: https://crucibleui.com/components/cursors/reticle
- Category: [cursors](https://crucibleui.com/components/cursors)
- Tier: pro (one-time purchase, see https://crucibleui.com/pricing)
- Engine: motion
- npm dependencies: motion

## Install

```bash
npx shadcn@latest add @crucible/reticle
```

Pro install requires adding the token-bearing `@crucible` registry to components.json (issued at https://crucibleui.com/account after purchase).

Import from `@/components/crucible/reticle`.

## Props (`ReticleProps`)

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className?` | `string` | — | — |
| `selector?` | `string` | `"[data-cursor-target]"` | CSS selector that arms the lock-on. |
| `size?` | `number` | `40` | Idle reticle edge length in px. |
| `padding?` | `number` | `8` | Breathing room between a locked target and the brackets, in px. |
| `colors?` | `{ /** Bracket body. @default "#e5e5e5" */ bracket?: string; /** Bright inner edge of each bracket. @default "#ffffff" */ edge?: string; /** Hairline frame + glow while locked. @default "rgba(255,255,255,0.6)" */ lock?: string; /** Spark fired at each corner on contact. @default "#ffffff" */ spark?: string; }` | — | Palette of the clamp. |
| `snap?` | `{ stiffness?: number; damping?: number; mass?: number }` | — | Spring physics for the snap/clamp motion. Lower damping = more overshoot before the bite. |
| `sparks?` | `boolean` | `true` | Fire a single ember spark at each corner on lock contact. |
| `global?` | `boolean` | — | Attach to the whole viewport instead of the nearest containing element. Off by default — Reticle is scoped to its parent (place it inside a `relative` container) so it never hijacks the cursor page-wide unless you explicitly opt in. |
| `hideNativeCursor?` | `boolean` | `false — Reticle augments rather than replaces` | Hide the native system cursor while active. |
| `idle?` | `boolean` | `true` | Idle autoplay (scoped mode only): after 1.5s with no pointer in the container, a ghost reticle tours the scope — gliding to each `selector` target in turn, locking on with the full clamp and sparks, holding, then drifting off to a seeded spot before the next. A real pointer takes over instantly. Also runs on touch-only devices. Never under reduced motion; sleeps offscreen. |

## Usage example

```tsx
import { Reticle } from "@/components/crucible/reticle";

export default function ReticleDemo() {
  return (
    <div className="relative isolate flex h-full min-h-[360px] w-full items-center justify-center overflow-hidden rounded-xl bg-neutral-950">
      <div
        aria-hidden
        className="pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_at_center,rgba(255,255,255,0.035),transparent_70%)]"
      />
      <Reticle />
      <div className="relative z-10 flex flex-col items-center gap-8 px-6 text-center">
        <div className="flex flex-col items-center gap-2">
          <p className="text-3xl font-semibold tracking-tight text-white">Move your cursor</p>
          <p className="max-w-sm text-sm text-neutral-500">
            Cross a marked target — the brackets overshoot, bite, and hold until you break the
            lock.
          </p>
        </div>
        <div className="flex flex-wrap items-center justify-center gap-4">
          <div
            data-cursor-target
            className="flex flex-col gap-1 rounded-lg border border-white/10 bg-white/5 px-5 py-3 text-left"
          >
            <p className="text-sm font-medium text-white">Projects</p>
            <p className="text-xs text-white/50">12 active — 3 shared</p>
          </div>
          <button
            type="button"
            data-cursor-target
            className="rounded-full border border-white/20 bg-white/5 px-5 py-2 text-sm font-medium text-white transition-colors hover:bg-white/10"
          >
            Hover me
          </button>
          <div
            data-cursor-target
            className="flex flex-col gap-1 rounded-lg border border-white/10 bg-white/5 px-5 py-3 text-left"
          >
            <p className="text-sm font-medium text-white">Notifications</p>
            <p className="text-xs text-white/50">4 unread — all quiet</p>
          </div>
        </div>
      </div>
    </div>
  );
}
```

## Accessibility & performance

Honors `prefers-reduced-motion` with a designed static frame or fade (never a blank box) and passes `className` through.
