Skip to content
PixiKit

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
NameTypeDefaultDescription
scope"container" | "page""container"Where the lines run: the nearest positioned parent, or the whole page.
colorstring"#ffffff"Colour of the lines, labels and brackets; any CSS colour.
containerRefRefObject<HTMLElement | null>NoneKeeps the crosshair inside this element, which needs a position other than static; without it the lines fill the nearest positioned parent.
thicknessnumber1Line thickness in pixels.
opacitynumber0.85Opacity of everything the crosshair draws.
lineStyle"solid" | "dashed" | "dotted""solid"Stroke style of the two lines.
gapnumber0Empty space in pixels left around the pointer where the lines would cross.
fadenumber0How much the lines fade out toward the edges, 0 to 1.
smoothingnumber0.35How far the lines trail behind the pointer; 0 sticks to it.
showCoordinatesbooleantrueShows 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.
targetSelectorstring"a, button, [data-crosshair-target]"CSS selector of the elements the crosshair reacts to.
clickPulsebooleantrueSends a ring out from the pointer on every click or tap.
hideCursorbooleanfalseHides 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.
classNamestringNone
styleCSSPropertiesNone

More interaction effects in Pro

View all

Related