Axis Cursor
Two full-length hairlines cross at the pointer, read out its position at the edges and frame the targets it hovers.
pixikit.com/docs/effects/axis-cursor
Customize
Scope
Color
Thickness1.0px
Opacity0.85
Line style
Gap0px
Fade0.00
Smoothing0.35
Show coordinates
Target effect
Click pulse
Hide cursor
Blend mode
Props
17| Name | Type | Default | Description |
|---|---|---|---|
scope | "container" | "page" | "container" | Where the lines run: the nearest positioned parent, or the whole page. |
color | string | "#ffffff" | Colour of the lines, labels and brackets; any CSS colour. |
containerRef | RefObject<HTMLElement | null> | None | Keeps the crosshair inside this element, which needs a position other than static; without it the lines fill the nearest positioned parent. |
thickness | number | 1 | Line thickness in pixels. |
opacity | number | 0.85 | Opacity of everything the crosshair draws. |
lineStyle | "solid" | "dashed" | "dotted" | "solid" | Stroke style of the two lines. |
gap | number | 0 | Empty space in pixels left around the pointer where the lines would cross. |
fade | number | 0 | How much the lines fade out toward the edges, 0 to 1. |
smoothing | number | 0.35 | How far the lines trail behind the pointer; 0 sticks to it. |
showCoordinates | boolean | true | 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 | string | "a, button, [data-crosshair-target]" | CSS selector of the elements the crosshair reacts to. |
clickPulse | boolean | true | Sends a ring out from the pointer on every click or tap. |
hideCursor | boolean | false | Hides the system cursor inside the 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. |
className | string | None | |
style | CSSProperties | None |