Following Pointer
Swaps the cursor for an arrow and a name tag that trail the pointer inside a region.
- 1.7 KB gzipped
- Deps: motion/react
- Reduced-motion safe
- Base UI & Radix compatible
Q3 launch board
Move your mouse around the canvas to see a teammate's cursor.
Installation
pnpm dlx shadcn@latest add https://velora.colorlib.com/r/following-pointer.jsonAdds components/velora/following-pointer.tsx, installs motion.
Examples
Blog grid
A grid of post cards where hovering shows a "Read post" tag.
Props
| Prop | Type | Default |
|---|---|---|
labelContent of the name tag next to the arrow; leave empty for an arrow only | React.ReactNode | — |
colorAny CSS colour for the arrow and tag | string | "var(--brand)" |
children* | React.ReactNode | — |
Also accepts every <div> attribute, forwarded to the root element.
Accessibility
- Reduced motion
- The arrow and tag track the pointer 1:1 with no spring, and appear and hide without a scale or fade.
- Keyboard
- Decorative — nothing to operate.
- Screen readers
- The arrow and tag are aria-hidden; the wrapped content is read and focused as normal.