Plugin: Tail
INFO
Tail draws a ribbon-like trailing curve behind the main circle, with configurable length, color, and dotted gap options.
Type Definitions
ts
interface Tail {
length?: number // default 10, maximum recorded trail points
color?: string // default '#00000033', tail color (lower opacity recommended)
firstDockGap?: number // default 0, near-circle initial segment gap (skip segments)
dockGap?: number // default 0, subsequent segment gap (create dotted effect)
}Usage Example
ts
import { CreateCursorWith } from 'cursorwith-ts/core';
import { tail } from 'cursorwith-ts/use';
const cw = new CreateCursorWith({ style: { radius: 18, color: '#ddddddaa' } });
cw.use(tail({
length: 14,
color: 'rgba(0,0,0,0.25)',
firstDockGap: 0,
dockGap: 0,
}));Behavior
- Tail width and opacity fade along the trail; segments near the circle are thicker and more solid, far segments are thinner and lighter.
- Larger
lengthmeans longer tails; too large may impact performance. firstDockGapanddockGapform dotted or intermittent tails:firstDockGapaffects only the segments closest to the circle.dockGapapplies to all subsequent segments.
- When hovering a target (
hoverEffectactive), the tail turns off automatically and resumes afterward.
Combination Tips
- Pair with
followmodes for richer tail dynamics. - Using with
hoverEffectis great for emphasizing focus; the system automatically avoids draw conflicts.
