Backgrounds
CreativeCursor Glow
Trails a little behind the pointer and fades when it leaves. Off on touch screens, where there is no hover to follow.
Install
Included with Creative: needs your API key. Initialize and log in once.
npx @galactrex/ui add cursor-glowUsage
import { CursorGlow } from "@/components/galactrex/cursor-glow";
<section className="relative overflow-hidden">
<CursorGlow />
<h1 className="relative">Light follows you</h1>
</section>Source
Installs to components/galactrex/cursor-glow.tsx, with the shared motion primitives beside it.
Source for this component comes with its plan. Install it with the command above, or open your licensed copy here.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
size | number | 420 | Diameter in px. |
intensity | number | 0.16 | Strength at the centre, 0 to 1. |
lag | number | 0.5 | How far it trails; 0 sticks to the pointer. |
color | string | var(--gxui-glow) | Glow colour. |
className | string | — | Extra classes for the outer element. |
Variants
- Trailing. Eases after the pointer.
- Pinned. `lag={0}` sticks to it.
Accessibility
- Decorative only and aria-hidden; never takes pointer events (it listens on the parent).
- Not rendered on touch screens.
Motion and reduced motion
- Spring-follow on transform only.
- Reduced motion: follows without the trailing ease.