Browse components
Target Cursor
A spinning reticle cursor whose corner brackets snap around any element you mark as a target.
Installation
npx shadcn@latest add @glint-ui/target-cursorFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glint-ui-seven.vercel.app/r/target-cursor.json
Usage
import { TargetCursor } from "@/components/ui/target-cursor";
<TargetCursor className="h-96">
<button data-cursor-target>Hover me</button>
</TargetCursor>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Content. Mark targets with data-cursor-target. |
| targetSelector | string | "[data-cursor-target]" | Elements matching this selector get wrapped by the brackets. |
| color | string | "#ffffff" | Reticle color. |
| spinSpeed | number | 120 | Degrees per second the idle reticle spins. |
| size | number | 34 | Idle reticle size in px. |
| padding | number | 8 | Px between a target and the brackets. |
| hideCursor | boolean | true | Hide the system cursor inside the container (mouse only). |
| className | string | — | Extra classes for the root element. |