1function isTouchScreendevice() {
2 return 'ontouchstart' in window || navigator.maxTouchPoints;
3};
4
5if(isTouchScreendevice()){
6 alert("I am a touch screen device")
7}
1/* npm i tappify */
2import Tappify from "tappify";
3
4/* Only works in react.js */
5function myComponent() {
6 return <>
7 <Tappify.Finger>
8 Client is using finger *tap tap*
9 </Tappify.Finger>
10
11 <Tappify.Cursor>
12 Client is using mouse cursor *click click*
13 </Tappify.Cursor>
14 </>
15}
16//more info: https://github.com/asplunds/tappify