Skip to content
Onycx-ui
ESC

Cursor Glow

Add a soft amber and burgundy glow that follows the pointer with a spring.

Dependencies
motion
Size
118 lines
Controls
7 controls

Installation

CLI · shadcn registry

npx shadcn@latest add https://ui.onycx.dev/r/cursor-glow.json

1 · Dependencies

npm install motion

2 · Copy the source

components/onycx/cursor-glow.tsx

Requires React 19 and Tailwind CSS v4. Copy the source from the cursor-glow.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

PropTypeDefaultDescription
sizenumber380Diameter in px; the light is centred on the pointer (offset −size/2).
color / secondaryColorstring"#8b1e2d" / "#b56a22"Core at 22% and halo at 10% by 40%, clear by 70%, mixed with color-mix.
opacitynumber0.4Layer opacity.
scope"page" | "container""page"Page: a fixed layer listening on window (the original). Container: an absolute layer clipped to a positioned parent that fades out when the pointer leaves.
stiffness / dampingnumber120 / 25motion/react useSpring settings for the trail.
zIndexnumber30Stacking order of the page-scope layer.