Cursorstable
TrailingCursor
Custom cursor ring
A dot pinned to the pointer and a ring that lags, grows and recolours.
Customize
Looklayers and colours
presetvariantdotColorringColorringBorderColormixBlendModeSize and motionring states and easing
6 px
dotSize34 px
ringSize52 px
ringHoverSize26 px
ringPressSize0.160
ease1.000
dotEase1.00
dotHoverScale1.00
dotPressScalehideNativeCursorpreserveTextCursorUsage
import { TrailingCursor } from "zerogravity/trailing-cursor"
<TrailingCursor />Generated from the controls above. Only props that differ from their defaults are shown.
Props
| Property | Type | Default | Description |
|---|---|---|---|
preset | "amber" | "cyan" | "violet" | "emerald" | "rose" | "mono" | "amber" | Preset palette. |
variant | "dot-ring" | "ring-only" | "dot-only" | "dot-ring" | Variant. |
dotColor | string | null | null | Override dot colour. |
ringColor | string | null | null | Override ring fill. |
ringBorderColor | string | null | null | Override ring border. |
mixBlendMode | "normal" | "difference" | "exclusion" | "screen" | "normal" | Blend mode. |
dotSize | number | 6 | Dot size. Range 2 to 24 px. |
ringSize | number | 34 | Ring size. Range 10 to 120 px. |
ringHoverSize | number | 52 | Ring on hover. Range 10 to 160 px. |
ringPressSize | number | 26 | Ring when pressed. Range 6 to 120 px. |
ease | number | 0.16 | Ring ease. Range 0.02 to 1. |
dotEase | number | 1 | Dot ease (1 pins it). Range 0.02 to 1. |
dotHoverScale | number | 1 | Dot on hover. Range 0 to 4. |
dotPressScale | number | 1 | Dot when pressed. Range 0 to 2. |
hideNativeCursor | boolean | true | Hide the native cursor. |
preserveTextCursor | boolean | true | Keep the text cursor in fields. |
Dependencies
0 external runtime dependencies
Ships with nothing but React.