# wellyshen/react-cool-inview

😎 🖥️ React hook to monitor an element enters or leaves the viewport (or another element).

Repository: https://github.com/wellyshen/react-cool-inview
Canonical: https://ross.abutalabs.com/products/react-cool-inview
Homepage: https://react-cool-inview.netlify.app
Language: TypeScript
License: MIT
License Family: permissive
Topics: react, hook, inview, viewport, visibility, lazy-loading, scrolling, animations, impressions, intersection-observer, monitor, scroll-direction, performance, typescript, component
Last push: 2023-08-12T16:39:11+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2344, "days_push": 1117, "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 1450, forks 39 (observed 2026-08-28T04:04:45.754552+00:00)

## What it is
A lightweight React hook and component that monitors when elements enter or leave the viewport using the Intersection Observer API. It supports use cases like lazy-loading images and videos, infinite scroll, triggering animations, tracking impressions, and detecting scroll direction.

## Use cases
- lazy load images when they scroll into view
- implement infinite scroll in react
- trigger animations when element enters viewport
- track ad impressions in react app
- detect scroll direction in react
- monitor element visibility with intersection observer

## When to choose
- you need performant viewport visibility detection in a React app without blocking the main thread
- you want a flexible hook-based API for lazy-loading, infinite scroll, or impression tracking
- you need scroll direction detection alongside visibility monitoring

## When to avoid
- you are not using React and need a vanilla Intersection Observer wrapper
- you need scroll position or parallax effects rather than enter/leave visibility events
- you require active maintenance and frequent updates, as the latest release was in 2023

## Facets
- artifact type: library
- maturity: maintenance
- function: ui-components, animation, image-processing
- domain: frontend, web-development, performance
- platform: browser, cross-platform
- tags: react-hook, intersection-observer, viewport-detection, lazy-loading, infinite-scroll, scroll-tracking, typescript, nodejs

## Member repositories
- wellyshen/react-cool-inview (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:45.754552+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-30T04:35:58.061407+00:00, confidence not recorded.
  - readme: https://github.com/wellyshen/react-cool-inview (fetched 2026-08-28T04:04:45.754552+00:00, sha 8918ff00e40a)
  - homepage: https://react-cool-inview.netlify.app (fetched 2026-08-29T11:45:46.109248+00:00, sha 147d133e6c27)
- Data as of 2026-08-30T08:39:29.467469+00:00.
