Static

Static: plain HTML

Add a Static cursor to any site with one stylesheet. No JavaScript.

  1. Open a cursor in the gallery, pick a variant, accent and scope, and choose Download zip.
  2. Copy the files into your public folder, for example public/cursors/. Keep them together: the CSS refers to the SVGs by relative path. (Choose One CSS file if you’d rather have a single file with the images inlined.)
  3. Link the CSS once, in the <head> of every page:
<link rel="stylesheet" href="/cursors/bold-arrow-light.css">

That’s it. There’s no script to run.

From the command line

The package includes a generator, cursor-static:

npm install --save-dev glint-cursors
npx cursor-static bold-arrow --variant dark --scope "#hero" --out public/cursors

Or print one CSS file with the SVGs inlined:

mkdir -p public/cursors
npx cursor-static dot --variant accent --accent "#E0115F" --inline > public/cursors/dot-accent.css

Run npx cursor-static --list for every family id. See the API reference for all options.

What the CSS does

  • Puts the normal cursor on the root you chose (html by default, so the whole window).
  • Puts the hover cursor on links, buttons, [role="button"], summary, label, select, checkboxes, radios, submit/button/reset/image inputs, and anything with data-cursor="hover". Disabled controls are excluded, so their cursor survives.
  • Wraps everything in a media query requiring a fine, hover-capable primary pointer, no forced colours and no increased contrast.
  • Uses no universal selector to apply a cursor and no !important. A universal selector is used only to exclude descendants of native regions.

Don’t edit the generated CSS. To change anything, regenerate it.

Known tradeoff

Over plain paragraph text and contenteditable areas, the custom normal cursor shows instead of the I-beam. Text inputs and textareas keep their I-beam.