Pointer Cue
Show a small View label beside the pointer when it passes over a preview image.
- Dependencies
- gsap
- Size
- 204 lines
- Controls
- 8 controls
Installation
CLI · shadcn registry
npx shadcn@latest add https://ui.onycx.dev/r/pointer-cue.json1 · Dependencies
npm install gsap2 · Copy the source
components/onycx/pointer-cue.tsx
Requires React 19 and Tailwind CSS v4. Copy the source from the pointer-cue.tsx tab after tweaking: your values are baked in as the new defaults. Exported image examples use portable sample artwork. Replace it with your own media as needed.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Content with cue targets. Without children a two-card catalog grid renders from items. |
| selector | string | "[data-cue]" | Targets that show the cue (only inside the wrapper). A non-empty data-cue value replaces the label for that target. |
| label / arrow | string / boolean | "View" / true | Cue text; arrow appends ↗. |
| size | number | 64 | Diameter in px; font is 9/64 of it. Both grow on 1800px+ viewports like the original's widescreen rules. |
| fill / fillOpacity | string / number | "#6d001a" / 0.565 | Disc colour and its strength (the original #6d001a90). |
| border / ink / blur | string / string / number | "#ffffff40" / "#ffffff" / 8 | 1px ring, text colour and backdrop blur in px. |
| duration | number | 0.3 | gsap.quickTo duration in seconds, power3.out. |
| items | PointerCueItem[] | — | { name, variant, tagline, index, image, href? } for the default catalog. |