idle-tracker
Tiny pure Javascript library to track browser inactivity
react-native-inactivity
Component that alerts when the user is inactive (i.e. when the App surface hasn't been touched for X ms)
inactivejs
Detect when a user is idle or change tabs