# terwanerik/ScrollTrigger

Let your page react to scroll changes.

Repository: https://github.com/terwanerik/ScrollTrigger
Canonical: https://ross.abutalabs.com/products/scrolltrigger
Homepage: https://terwanerik.github.io/ScrollTrigger/
Language: JavaScript
License: MIT
License Family: permissive
Topics: animation, html-element, user-scrolls, scrolltrigger, trigger, css, javascript
Last push: 2023-08-14T15:10:12+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": 3723, "days_push": 1115, "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 3965, forks 300 (observed 2026-08-28T04:08:30.677166+00:00)

## What it is
A lightweight JavaScript library that lets web pages react to scroll changes by toggling CSS classes and running callbacks when elements enter or leave the viewport. It supports per-element offsets, one-time triggers, and Promise-based callbacks useful for lazy loading.

## Use cases
- fade in elements when they scroll into view
- lazy load images when they enter the viewport
- trigger animations based on scroll position
- implement infinite scroll
- toggle classes when elements leave the viewport
- run callbacks when a section becomes visible

## When to choose
- you need simple scroll-based class toggling or callbacks in vanilla JavaScript
- you want a lightweight alternative to full animation suites like GSAP ScrollTrigger
- you need lazy loading or infinite scroll driven by viewport visibility

## When to avoid
- you need complex scroll-scrubbed timeline animations (GSAP ScrollTrigger is more capable)
- your project is not browser-based JavaScript
- you need a library with frequent updates and active development

## Facets
- artifact type: library
- maturity: maintenance
- function: animation, frontend-framework, ui-components
- domain: web-development, frontend
- platform: browser
- tags: scroll-trigger, scroll-animations, lazy-loading, viewport-detection, vanilla-javascript, scroll-events, javascript, nodejs

## Member repositories
- terwanerik/ScrollTrigger (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:30.677166+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:24:25.819534+00:00, confidence not recorded.
  - readme: https://github.com/terwanerik/ScrollTrigger (fetched 2026-08-28T04:08:30.677166+00:00, sha 525444b29160)
  - homepage: https://terwanerik.github.io/ScrollTrigger/ (fetched 2026-08-29T09:18:08.452352+00:00, sha e16e001f9662)
- Data as of 2026-08-30T08:39:29.467469+00:00.
