IsIdle
Track if a user is idle and the last time they were active.
IsIdle
tracks user activity and determines if they're idle based on a configurable timeout. It
monitors mouse movement, keyboard input, and touch events to detect user interaction.
Demo
Idle: false
Last active: 0s ago
By default, the time of inactivity before marking the user as idle is 1 minute.
In this demo, it's 1 second.