# any_hover

> Whether any input device can hover, from the any-hover media query: hover or none. Reported, not in either id.

Source: https://whiskerjs.com/signals/any-hover/ (last updated 2026-10-27)

**any_hover at a glance (from the library code, signalsVersion 14)**

| Field | Value |
| --- | --- |
| Component name | `any_hover` |
| In the visitorId | no (reported, kept out of both ids) |
| structuredId group | none |
| Hashing | plain value; a digest only when longer than 128 characters or not printable ASCII |
| Excluded under | no browser class |
| Inner timeout | 1000 ms |
| Added in | [signalsVersion 11](https://whiskerjs.com/whats-new/) |
| Collector revision | [1](https://whiskerjs.com/docs/api/#component) (reported as `revision` with every result) |

> **In plain words:**
>
> Like `hover`, but for every input device at once: if any attached device can hover, the answer is `hover`.

## What it reads

The CSS `any-hover` media feature through `window.matchMedia()`. Nothing else: no events, no pointer positions, no input is read.

## How the technique works

| Order | Query | Value reported |
| --- | --- | --- |
| 1 | `(any-hover: hover)` | `hover` |
| 2 | `(any-hover: none)` | `none` |

The first match is reported; no match gives `unavailable` with `no_match`.

## Why it helps

It completes the picture of `pointer`, `hover` and `any_pointer`: a phone reports none for both hover queries, a desktop hover for both, and a tablet with a trackpad cover none and hover. The `media_query_mismatch` integrity flag reads it too.

## Stability

It changes when a mouse, trackpad or pen is attached or removed. That is why it is reported but kept out of both ids for now; it can join the id once measurement shows it is stable. Added in library PR #29 (2026-10-27) at signalsVersion 11: it is outside both ids, so adding it changed no id and needed no version bump.

## Browser support and what blocks it

Every current engine answers the query. In the hosted CI runs of PR #29 (headless Chromium 153, Chrome 155, Firefox with and without its privacy settings, and WebKit, on a Linux server) every browser reported the same value in every collection. No browser class excludes it.

## Privacy

It says what kind of input device is in use, which the page could also learn from the user’s own clicks and taps. It needs no permission and shows no prompt. Leave it out with `collect({ exclude: ['any_hover'] })` if you do not need it; no id changes.

## How WhiskerJS handles noise and failures

| Status | ruleId | When |
| --- | --- | --- |
| `ok` |   | one of the values above |
| `unavailable` | `no_api` | no `matchMedia` |
| `unavailable` | `no_match` | no value matched |
| `blocked` | `threw`, `security_error` | `matchMedia` throws |
| `excluded` | `caller_excluded` | you excluded it |
| `timed_out` | `timeout`, `aborted` | budget or abort |

Like every component it also carries `durationMs` (how long its collector ran, 0.1 ms) and `revision` (1).

## Example value

```json
"any_hover": { "status": "ok", "value": "hover", "hashed": false, "durationMs": 0.1, "revision": 1 }
```

## Questions and answers

### When do hover and any_hover differ?

On a touch-first device with a mouse or trackpad attached: the primary pointer (a finger) cannot hover, so hover is none, but the attached mouse can, so any_hover is hover.

### Is it in the visitorId?

No. It changes when input devices are attached or removed, so it is reported but kept out of both ids.

## Related pages

- [hover](https://whiskerjs.com/signals/hover/): Hover for the primary pointer.
- [any_pointer](https://whiskerjs.com/signals/any-pointer/): Every pointing device.
- [What changes the id](https://whiskerjs.com/docs/identifiers/#what-changes-the-id): Why signals outside the id leave it alone.
