# SupremeTechnopriest/react-idle-timer

User activity timer component

Repository: https://github.com/SupremeTechnopriest/react-idle-timer
Canonical: https://ross.abutalabs.com/products/react-idle-timer
Homepage: https://idletimer.dev
Language: TypeScript
License: MIT
License Family: permissive
Topics: idle, timer, idletimer, react, activity, hacktoberfest
Last push: 2026-03-20T19:01:36+00:00

## Health v2 (maintenance only)
Score: 56/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 73, release rhythm 8, longevity 100
- inputs: {"age_days": 4086, "days_push": 166, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1205, forks 144 (observed 2026-08-28T04:03:59.293481+00:00)

## What it is
React Idle Timer is a React hook and component for detecting user activity and idle states in web applications. It provides configurable idle timeouts, debounced or throttled activity callbacks, a built-in 'are you still there' confirm prompt, cross-tab synchronization via BroadcastChannel, and WebWorker-offloaded timers to avoid background tab throttling.

## Use cases
- log out inactive users in a react app
- detect when a user goes idle and becomes active again
- show an 'are you still there' prompt with a countdown before session timeout
- sync idle state across multiple browser tabs
- track and react to user activity events like mouse and keyboard input
- keep timers accurate when the tab is in the background

## When to choose
- you are building a React app and need reliable idle/active presence detection
- you need cross-tab or multi-window synchronization with leader election
- you want a built-in confirm prompt flow before firing the idle event
- you need a battle-tested solution with high download volume, full test coverage, and TypeScript support

## When to avoid
- your project is not React-based (e.g., Vue, Angular, vanilla JS) since the API is React-specific
- you only need a simple one-tab timeout that a plain setTimeout with event listeners can cover
- you need idle detection on a server or in non-browser environments

## Facets
- artifact type: library
- maturity: stable
- function: ui-components, state-management
- domain: frontend, web-development
- platform: browser
- tags: react, react-hook, idle-detection, activity-detection, timer, cross-tab, web-worker, user-presence, session-timeout, typescript, confirm-prompt, broadcast-channel

## Member repositories
- SupremeTechnopriest/react-idle-timer (main) score 56

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:59.293481+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:19:23.762583+00:00, confidence not recorded.
  - readme: https://github.com/SupremeTechnopriest/react-idle-timer (fetched 2026-08-28T04:03:59.293481+00:00, sha f355ae4a7ce8)
  - homepage: https://idletimer.dev (fetched 2026-08-29T12:27:19.726578+00:00, sha c8a817642e5c)
  - site_page: https://idletimer.dev/docs/getting-started/new (fetched 2026-08-29T12:27:19.745829+00:00, sha 4925569313b1)
  - site_page: https://idletimer.dev/docs/features/idle-detection (fetched 2026-08-29T12:27:19.765384+00:00, sha 0b60747ad20a)
  - site_page: https://idletimer.dev/docs/features/activity-detection (fetched 2026-08-29T12:27:19.767482+00:00, sha 6971617e3724)
  - site_page: https://idletimer.dev/docs/features/confirm-prompt (fetched 2026-08-29T12:27:19.769161+00:00, sha 1cd48c14342f)
  - site_page: https://idletimer.dev/docs/features/cross-tab (fetched 2026-08-29T12:27:19.770898+00:00, sha c0fb47dc5dd3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
