More cursor effects in Pro
Cursor trails and pointer effects that give a site its own feel.
color | '#ffffff' | Color of the lines, labels and brackets. | |
containerRef | RefObject<HTMLElement> | null | Keeps the crosshair inside this element, which needs a position other than static. Without it the crosshair covers the whole viewport. |
thickness | Line thickness in px. | ||
opacity | 0.85 | Opacity of everything the crosshair draws. | |
lineStyle | 'solid' | 'dashed' | 'dotted' | 'solid' | Stroke style of the two lines. |
gap | Empty space in px left around the pointer where the lines would cross. | ||
fade | How much the lines fade out toward the edges, from 0 to 1. | ||
smoothing | 0.35 | How far the lines trail behind the pointer. 0 sticks to it. | |
showCoordinates | Shows the pointer position where the lines meet the edges, and the size of a locked target. | ||
targetEffect | 'lock' | 'glitch' | 'none' | 'lock' | What happens over a target. Lock frames it with corner brackets and measures it, glitch shakes the lines like a bad signal. |
targetSelector | 'a, button, [data-crosshair-target]' | CSS selector for the elements the crosshair reacts to. | |
clickPulse | Sends a ring out from the pointer on every click or tap. | ||
hideCursor | Hides the system cursor inside the crosshair area and marks the pointer with a dot instead. | ||
blendMode | 'normal' | 'difference' | 'normal' | Difference inverts whatever is under the lines, so they stay visible on any background. |
| Extra class names for the canvas. | |||
| Inline styles for the canvas. |
colorstringColor of the lines, labels and brackets.
'#ffffff'containerRefRefObject<HTMLElement>Keeps the crosshair inside this element, which needs a position other than static. Without it the crosshair covers the whole viewport.
nullthicknessnumberLine thickness in px.
opacitynumberOpacity of everything the crosshair draws.
0.85lineStyle'solid' | 'dashed' | 'dotted'Stroke style of the two lines.
'solid'gapnumberEmpty space in px left around the pointer where the lines would cross.
fadenumberHow much the lines fade out toward the edges, from 0 to 1.
smoothingnumberHow far the lines trail behind the pointer. 0 sticks to it.
0.35showCoordinatesbooleanShows the pointer position where the lines meet the edges, and the size of a locked target.
targetEffect'lock' | 'glitch' | 'none'What happens over a target. Lock frames it with corner brackets and measures it, glitch shakes the lines like a bad signal.
'lock'targetSelectorstringCSS selector for the elements the crosshair reacts to.
'a, button, [data-crosshair-target]'clickPulsebooleanSends a ring out from the pointer on every click or tap.
hideCursorbooleanHides the system cursor inside the crosshair area and marks the pointer with a dot instead.
blendMode'normal' | 'difference'Difference inverts whatever is under the lines, so they stay visible on any background.
'normal'Extra class names for the canvas.
Inline styles for the canvas.



