Skip to Content
Platform.Ontology

hover, pointer, any-pointer

Whether the main input is a mouse, finger or stylus and whether hover works.

Gets silentlyScreen and windowsCSS media featuresWeb browsersWhen the page loadsWhile you use it

In one line

Can tell if you use a mouse, finger or stylus, and whether hover works

Whether the main input is a mouse, finger or stylus and whether hover works.

pointer is coarse for touch, fine for mouse or pen; hover is hover or none. any-* variants say if any attached device qualifies, revealing a mouse on a tablet or a touchscreen on a laptop.

What it can and can't do

What the user does: Nothing. It happens when the page loads.

It can

  • Check what your main input is
  • Check which other inputs are attached, at a rough level
  • Make buttons bigger for fingers

It cannot

  • See which mouse brand or model you use
  • See your clicks or movements
  • Tell when you plug in a device later without checking again

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported412015-03-03None
EdgeSupported122015-07-29None
FirefoxSupported642018-12-11None
SafariSupported92015-09-30None
Safari on iPhoneSupported92015-09-16None
Chrome on AndroidSupported502016-04-13None
Samsung InternetSupported5.02016-12-15None

How a site asks for it

APImatchMedia('(pointer: fine)'), (hover: hover), (any-pointer: coarse), (any-hover)
Browser compat keyscss.at-rules.media.pointer
css.at-rules.media.hover
How access is grantednone
What the user seesNone
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsread fresh on every page load; nothing stored
How to take it backnone needed (no grant)
Inside an iframeReadable from cross-origin iframes too (same values)

Typical flow

  1. Page script reads the value
  2. No prompt is shown

Data you get

Shape: object
How often: static per session

FieldTypeUnitRangePrecision
pointer, any-pointerenumNonenone, coarse, fineNot listed
hover, any-hoverenumNonenone, hoverNot listed

Technical limits

  • Cannot see which device is currently used

The story

What it is

Tells a page whether the main input is a mouse, finger or pen, and whether hover works.

For you

You never see the check. It is why buttons are bigger on a touch screen, and menus open on hover with a mouse but need a tap on a phone.

For makers

Makers use it to give touch users larger buttons and mouse users hover tools. It is also a clue that tells phones from laptops, and helps catch fake devices.

Where you see it

TypeExampleApps
gamesA browser game shows on screen touch controls on a phone and keyboard hints on a laptop.None named
creativeA drawing app turns on pressure and pen tools when a stylus is detected.Figma, Miro
shoppingA store shows a zoom on hover for mouse users and a tap to zoom for phone users.None named
adsA site chooses a bigger, easier to tap ad close button on touch screens.None named
securityA bot check sees a device that claims to be a phone but supports hover and a fine pointer, which is odd, and adds risk.None named
accessibilityA site makes tap targets larger for people who use coarse input or have shaky hands.None named
travelA booking site shows hover tips about fees with a mouse and tap to expand on a phone.None named

Risks

  • Fingerprint clue
  • Reveals touch or mouse use

What the platform says

Good uses and abuse

Legitimate uses

  • Touch-sized targets

Known abuse

  • Hardware combination

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility4 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits1.5Rough identifying entropy, when known
  • Touch support. Can tell if your screen takes touch and how many fingers at once

Sources

How well checked: Based on official documentation.

On this page