# stutrek/scrollmonitor

A simple and fast API to monitor elements as you scroll

Repository: https://github.com/stutrek/scrollmonitor
Canonical: https://ross.abutalabs.com/products/scrollmonitor
Language: TypeScript
License: MIT
License Family: permissive
Topics: scroll, dom, javascript, viewport
Last push: 2023-07-17T20:03:30+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4985, "days_push": 1143, "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 3273, forks 235 (observed 2026-08-28T04:07:53.206126+00:00)

## What it is
A lightweight, dependency-free JavaScript library that monitors DOM elements as the user scrolls, firing events when elements enter or exit the viewport. It uses cheap watcher objects and touches the DOM minimally on each scroll event for high performance.

## Use cases
- trigger animations when elements scroll into view
- lazy-load images as they approach the viewport
- detect when an element leaves the viewport
- build sticky or fixed sidebar behavior on scroll
- monitor scrolling inside a container element instead of the body
- track element visibility and position relative to the viewport

## When to choose
- you need fast, cheap scroll-based element visibility events without a framework
- you want a vanilla JS solution with no dependencies
- you need to watch elements inside custom scroll containers

## When to avoid
- you use React and prefer hooks or components (use scrollmonitor-hooks or scrollmonitor-react instead)
- you need IntersectionObserver-based modern APIs and can rely on native browser support
- the project needs active feature development, as the library is in maintenance mode

## Facets
- artifact type: library
- maturity: maintenance
- function: ui-components, animation, developer-tools
- domain: web-development, frontend
- platform: browser
- tags: scroll-monitoring, viewport, dom, watchers, lazy-loading, zero-dependencies, javascript, nodejs

## Member repositories
- stutrek/scrollmonitor (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:53.206126+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-29T18:43:48.857558+00:00, confidence not recorded.
  - readme: https://github.com/stutrek/scrollmonitor (fetched 2026-08-28T04:07:53.206126+00:00, sha 7633f6332229)
  - registry_npm: https://registry.npmjs.org/scrollmonitor (fetched 2026-08-29T09:36:33.452256+00:00, sha 4cada325bde1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
