CursorTrail

Animated trail effect that tracks cursor movement

Props

  • colorA

    Color of fresh trails

    Type
    string
    Default
    #00aaff
  • colorB

    Color trails transition to as they fade

    Type
    string
    Default
    #ff00aa
  • stops

    Multi-stop gradient colors (overrides Color A / Color B when set)

    Type
    object
    Default
    null
  • radius

    Base radius of the trail stroke

    Type
    number
    Default
    0.5
  • length

    How long the trail persists (in seconds)

    Type
    number
    Default
    0.5
  • shrink

    How much the stroke tapers as it fades out (0 = no taper, 1 = full taper)

    Type
    number
    Default
    1
  • softness

    Edge softness of the trail (0 = crisp paint edge, 1 = very soft)

    Type
    number
    Default
    0
  • colorSpace

    Color space for color interpolation

    Type
    "linear" | "oklch" | "oklab" | "hsl" | "hsv" | "lch"
    Default
    linear

Usage

<Shader>
  <CursorTrail
    radius={0.5}
  />
</Shader>