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 px
width12 px
blur0.60 s
decayUsage
import { Chroma } from "zerogravity/chroma"
<Chroma />Generated from the controls above. Only props that differ from their defaults are shown.
Props
| Property | Type | Default | Description |
|---|---|---|---|
width | number | 24 | Width. Range 4 to 80 px. |
blur | number | 12 | Blur. Range 0 to 40 px. |
decay | number | 0.6 | Decay. Range 0.1 to 1.5 s. |
children | ReactNode | — | The surface the trail is drawn over. |
colors | [string, string, string] | CHROMA_COLORS | Fresh, middle and faded tint of the trail. Any CSS colour, including var(). |
enableOnTouch | boolean | false | Let a finger draw the trail too. A sideways drag draws; vertical scrolling still works. |
paused | boolean | false | Time advances one frame per pointer sample, never on its own. |
disabled | boolean | false | No trail at all. |
respectReducedMotion | boolean | true | Under prefers-reduced-motion, a still glow under the pointer instead. |
Dependencies
0 external runtime dependencies
Ships with nothing but React.