Skip to Content
Platform.Ontology

Custom or hidden cursor

Replaces the mouse pointer with an image, or hides it, inside the page.

Does something on your deviceScreen and windowsPointer appearanceWeb browsersWhile you use it

In one line

Can swap your mouse pointer for an image, or hide it, only inside the page

Replaces the mouse pointer with an image, or hides it, inside the page.

A site can change or hide the pointer, helping games and drawing apps. Browsers block cursors that could imitate system pointers or hide over browser UI, so a page cannot fake the cursor outside its own area.

What it can and can't do

What the user does: You move your mouse over the page or a button on it.

It can

  • Show a custom image as the pointer
  • Hide the pointer while it is over the page
  • Change the pointer for different buttons or areas

It cannot

  • Change the pointer outside the page, in the browser's toolbar or other apps
  • Use very large images, since browsers cap the size and fall back to the normal pointer
  • Hide the pointer after you move it out of the page

How it differs between platforms: Phones and tablets have no mouse pointer, so touch screens ignore this.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported12008-12-11None
EdgeSupported122015-07-29None
FirefoxSupported12004-11-09None
SafariSupported1.22004-02-02None
Safari on iPhoneSupported13.42020-03-24All iOS browsers use WebKit
Chrome on AndroidSupported182012-06-27None
Samsung InternetSupported1.02013-04-27None

How a site asks for it

APICSS cursor: url(img) x y, auto; cursor: none
Browser compat keyscss.properties.cursor
How access is grantednone
What the user seesNone (no browser prompt)
Needs a secure context (HTTPS)No
Needs a user gestureNo
Activationnone
How long it lastsPer element, while the pointer is over it; no stored state
How to take it backNothing to revoke (no permission is stored)
Inside an iframeApplies to the frame's own content only

Typical flow

  1. Page sets CSS cursor on an element
  2. Browser draws the image while the pointer is over the element
  3. Cursor reverts at the edge or over browser UI

Data you get

Shape: none

No individual data fields. The signal is the access itself.

Technical limits

  • Image size limit is 128 by 128 px in Chrome and Firefox (32 by 32 recommended); larger images are ignored
  • Chrome blocks cursors larger than 32 by 32 px when they would overlap browser UI (about 2019)
  • Cursors only change inside the viewport; the cursor cannot be moved by script (see Pointer Lock for hidden relative motion)
  • cursor: none hides the pointer; the person can still see it over browser UI
  • Touch screens ignore custom cursors

The story

What it is

A page swaps your mouse pointer for its own picture, or hides it.

For you

You see the pointer change into a hand, a crosshair, a paint brush or a game sword. Sometimes it vanishes so you can look around a 3D scene.

For makers

A custom pointer makes a site feel like an app and tells you what a click will do. It is used for polish and for games. It can also be abused to hide the real pointer position in tricks.

Where you see it

TypeExampleApps
gamesA first person browser shooter hides the pointer and locks it in place so moving the mouse turns your view.Krunker.io
creativeA design board shows each teammate's name next to their own colored pointer as they move around the canvas.Figma, Miro
creativeA drawing tool turns the pointer into a circle that matches your brush size.None named
adsA flashy brand site turns the pointer into a logo or a follow along shape to feel playful.None named
securityA scam page hides the real pointer and draws a fake one a few pixels off so clicks land on a hidden button.None named
accessibilityA site enlarges the pointer for people with low vision.None named
kidsA kids learning game turns the pointer into a friendly animal or star.None named

Risks

  • Fake pointer tricks
  • Can confuse people

What the platform says

  • MDN: CSS cursor. Shows how a page can use built in pointer shapes or its own image for the pointer.

Good uses and abuse

Legitimate uses

  • Games and drawing tools
  • Design and map tools
  • Whiteboards

Known abuse

  • Hidden pointer on spoof overlays
  • Fake cursor positioned away from the true pointer (clickjacking aid)

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2019-06, Chrome 75: Large custom cursors are blocked when they would overlap browser UI

Sources

How well checked: Based on official documentation.

On this page