# lafikl/steady.js

A module to do some logic on the `onscroll` event without performance regressions in a @media-query like conditions.

Repository: https://github.com/lafikl/steady.js
Canonical: https://ross.abutalabs.com/products/steadyjs
Homepage: http://lafikl.github.io/steady.js/
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2015-10-30T06:52:21+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": 4482, "days_push": 3960, "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 1348, forks 35 (observed 2026-08-28T04:04:27.741480+00:00)

## What it is
Steady.js is a small JavaScript module for running logic on the onscroll event without performance regressions, using media-query-like conditions and customizable trackers. It keeps the scroll handler tiny (collecting values only) and offloads condition evaluation to requestAnimationFrame, throttling work so scrolling stays jank-free.

## Use cases
- run code when the user scrolls near the bottom of a page or element
- implement infinite scroll or lazy loading without jank
- write scroll-position conditions like media queries (e.g. when scrolled 500px down)
- optimize a heavy onscroll handler that causes dropped frames
- trigger UI changes based on scroll depth or viewport width
- build custom scroll trackers that collect values like top, bottom, width, or scrollLeft

## When to choose
- you need scroll-triggered behavior (infinite scroll, lazy loading, sticky reveals) that stays smooth
- you want declarative, media-query-style conditions on scroll values instead of manual event math
- you're working on a vanilla JS or older-stack frontend where a tiny dependency-free scroll utility fits

## When to avoid
- you're on a modern stack where native IntersectionObserver covers scroll-triggered behavior without a library
- you need a currently maintained library with recent updates and security support (last release was 2015)
- you need framework-specific scroll integrations (React/Vue components) rather than a vanilla DOM utility

## Facets
- artifact type: library
- maturity: abandoned
- function: animation, state-management
- domain: web-development, frontend, performance
- platform: browser
- tags: scroll-events, onscroll, requestanimationframe, jank-free, infinite-scroll, lazy-loading, media-queries, scroll-position, trackers, vanilla-javascript, dom, tiny-library

## Member repositories
- lafikl/steady.js (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:27.741480+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:42:25.708843+00:00, confidence not recorded.
  - readme: https://github.com/lafikl/steady.js (fetched 2026-08-28T04:04:27.741480+00:00, sha dcdb71533895)
  - homepage: http://lafikl.github.io/steady.js/ (fetched 2026-08-29T12:01:45.047186+00:00, sha 4c06f22bd14e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
