ZeroGravity UI

Cursorstable

Chroma

Colour cursor trail

A soft chromatic cursor trail that curves smoothly behind the pointer and fades out.

A cursor effect: on a touch screen it stays off unless enableOnTouch is set.

Customize

Traila soft chromatic comet that fades out behind the pointer
24 pxwidth
12 pxblur
0.60 sdecay

Usage

TSX
import { Chroma } from "zerogravity/chroma"

<Chroma />

Generated from the controls above. Only props that differ from their defaults are shown.

Props

9 documented props on Chroma
PropertyTypeDefaultDescription
widthnumber24Width. Range 4 to 80 px.
blurnumber12Blur. Range 0 to 40 px.
decaynumber0.6Decay. Range 0.1 to 1.5 s.
childrenReactNode—The surface the trail is drawn over.
colors[string, string, string]CHROMA_COLORSFresh, middle and faded tint of the trail. Any CSS colour, including var().
enableOnTouchbooleanfalseLet a finger draw the trail too. A sideways drag draws; vertical scrolling still works.
pausedbooleanfalseTime advances one frame per pointer sample, never on its own.
disabledbooleanfalseNo trail at all.
respectReducedMotionbooleantrueUnder prefers-reduced-motion, a still glow under the pointer instead.

Dependencies

0 external runtime dependencies

Ships with nothing but React.