Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/raheemcodes/type-of-input

How to detect the primary input mechanism of your device with CSS
https://github.com/raheemcodes/type-of-input

Last synced: about 1 month ago
JSON representation

How to detect the primary input mechanism of your device with CSS

Awesome Lists containing this project

README

        

# How to detect the primary input mechanism of your device

### Codepen - https://codepen.io/raheemscorp/pen/JjLMYEo
### StackBlitz - https://stackblitz.com/edit/web-platform-zhfjzd?file=index.html

#### Tip - To verify the integrity of this code, inspect the browser then switch between the desktop and touch devices.

## Features

### pointer: fine | coarse | none
#### fine - for accurate pointing device
#### coarse - for pointing device with limited accuracy
#### none - for the presence of no pointing

## Reference -

### MDN - https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pointer

### Web.dev - https://web.dev/learn/design/interaction/