X-ray Lens Cursor
A round lens follows the pointer on a spring and shows a second, perfectly aligned layer of the same content — blueprint, wireframe or annotations — through a clip-path. Press to swell the lens. The reveal is decorative and hidden from assistive tech.
Try it: Move over the poster to open the lens; press and hold to swell it.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/xray-lens-cursor.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/xray-lens-cursor. You can also copy the source into components/ui/xray-lens-cursor.tsx (view on GitHub).
Usage
import { XrayLensCursor } from '@/components/ui/xray-lens-cursor'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
children | ReactNode | — | The normal layer everyone reads. |
reveal | ReactNode | — | The aligned layer shown inside the lens (decorative duplicate of the same layout). |
size / pressedSize | number | 170 / 250 | Lens diameter in px, resting and while pressed. |
label | string | 'x-ray' | Caption on the lens rim (shows live coordinates). |
className | string | — | Extra classes merged onto the frame. |
Dependencies
motion
Related Cursors components
- Pill Trail Cursor
Pointer leaves a springing trail of word pills.
- Orbit Ring Cursor
Thin ring orbits the pointer.
- Halftone Bloom Cursor
Pointer blooms a lilac halftone matrix.
- Ink Stamp Cursor
Small ink stamps that fade behind the pointer.
- Cursor Trail
Glowing trail following the pointer.
- Lens Flare Cursor
Soft optical flare that lags behind the pointer.