Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultCursorCrosshair Cursor
Corner Reveal ListBrowse all 182Line Trail Cursor
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Crosshair Cursor

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

    Setup

    npm i gsap

    Features.

    • Two full-width hairlines cross at the pointer, with a small accent "+" on the point
    • Live X/Y readout in px, measured from the section's top-left
    • An optional hint panel beside the pointer that fades on the first click
    • Short, frame-rate independent lag: the same feel on 60 Hz and 120 Hz screens
    • Appears where the pointer enters, hides a beat after it leaves
    • Works on any section: drop the overlay inside and it tracks its parent
    • No dependencies; draws only while it is catching up, so an idle section costs nothing
    • Stays under the pointer when the page scrolls
    • Mouse only: nothing runs on touch screens, and touch and pen are ignored elsewhere; respects prefers-reduced-motion

    How to get it right.

    Give the parent a position

    The overlay fills its parent with position: absolute; inset: 0, so the parent needs position: relative (or any non-static position) and usually overflow: hidden. Put the overlay last inside it so it sits above the content.

    Keep the lag short

    data-au-lerp="0.5" reads as precise: the lines trail just enough to feel physical. Drop to 0.15–0.25 for a floaty, deliberate follow; go to 1 to pin it to the pointer.

    Let the lines whisper

    The hairlines sit at 0.16 opacity so they frame the content instead of cutting through it. On a light background, set --ccr-line dark and keep the opacity low.

    Add a hint only if it helps

    There's no hint by default. To add one, put <span class="ccr_hint" data-ccr-hint>Your words</span> at the end of the overlay, or pass hint in React. It's one short instruction in caps, under five words.

    Variations.

    • Technical — the default: readout, accent mark, short lag
    • Minimal — data-au-coords="false": just the lines and the mark
    • Floaty — data-au-lerp="0.15" for a slow, trailing follow
    • Light theme — --ccr-line: #252422, --ccr-muted: #55524c, --ccr-hint-bg: #252422, --ccr-hint-fg: #fffcf2
    • Monochrome — data-au-color="#fffcf2" so the mark matches the lines

    Where it fits.

    • Studio or product hero — a precise, engineered feel before any content moves
    • Case study canvas — over a large image or mockup, as a viewfinder
    • Interactive grid or map — the readout makes positions feel measured
    • Contact or 404 page — one quiet interaction on an otherwise still page

    Frequently asked.

    The crosshair appears only once a mouse moves over the parent, and never on touch screens. Check the parent has a size and a non-static position.

    If the parent is position: static, the overlay fills the nearest positioned ancestor instead: the lines stay on the pointer but run past the section, and the readout counts from that ancestor. Give the parent position: relative.

    Yes. Place it inside a positioned element that wraps the page content. It only reacts while the pointer is over its parent.

    No. The overlay has pointer-events: none; everything underneath stays clickable.

    Yes — override the --ccr-* variables on the root, and set the mark colour and line opacity with data-au-color and data-au-line-opacity.

    Related components.

    Free

    Dither Reveal Cursor

    Cursor

    Pro

    Cursor Push Tags

    Cursor

    Pro

    Mesh Gradient Hero

    Cursor