ZeroGravity UI

Cursorstable

TrailingCursor

Custom cursor ring

A dot pinned to the pointer and a ring that lags, grows and recolours.

Customize

Looklayers and colours
preset
variant
dotColor
ringColor
ringBorderColor
mixBlendMode
Size and motionring states and easing
6 pxdotSize
34 pxringSize
52 pxringHoverSize
26 pxringPressSize
0.160ease
1.000dotEase
1.00dotHoverScale
1.00dotPressScale
hideNativeCursor
preserveTextCursor

Usage

TSX
import { TrailingCursor } from "zerogravity/trailing-cursor"

<TrailingCursor />

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

Props

16 documented props on TrailingCursor
PropertyTypeDefaultDescription
preset"amber" | "cyan" | "violet" | "emerald" | "rose" | "mono""amber"Preset palette.
variant"dot-ring" | "ring-only" | "dot-only""dot-ring"Variant.
dotColorstring | nullnullOverride dot colour.
ringColorstring | nullnullOverride ring fill.
ringBorderColorstring | nullnullOverride ring border.
mixBlendMode"normal" | "difference" | "exclusion" | "screen""normal"Blend mode.
dotSizenumber6Dot size. Range 2 to 24 px.
ringSizenumber34Ring size. Range 10 to 120 px.
ringHoverSizenumber52Ring on hover. Range 10 to 160 px.
ringPressSizenumber26Ring when pressed. Range 6 to 120 px.
easenumber0.16Ring ease. Range 0.02 to 1.
dotEasenumber1Dot ease (1 pins it). Range 0.02 to 1.
dotHoverScalenumber1Dot on hover. Range 0 to 4.
dotPressScalenumber1Dot when pressed. Range 0 to 2.
hideNativeCursorbooleantrueHide the native cursor.
preserveTextCursorbooleantrueKeep the text cursor in fields.

Dependencies

0 external runtime dependencies

Ships with nothing but React.