scroll-into-view/scroll-into-view-if-needed
Element.scrollIntoView ponyfills for things like "if-needed" and "smooth" observed · 2026-08-28
Health v2 · maintenance only
67/100
- Activity 99
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3789
- days_rel: n/a
- days_push: 7
- n_releases_24m: 0
Adoption not part of the score
1450 stars · 77 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A small, dependency-free JavaScript ponyfill for Element.scrollIntoView that implements upcoming spec features like scrollMode: 'if-needed', behavior: 'smooth', and alignment options. It lets developers scroll elements into view only when necessary, with customizable boundaries and scroll behavior.
Use cases
- scroll an element into view only if it is not fully visible
- smoothly scroll to a DOM element with consistent behavior across browsers
- align a scrolled element to center of the viewport
- limit scrolling to a specific boundary container
- replace non-standard scrollIntoViewIfNeeded with a spec-compliant API
- customize scroll animation with a custom behavior function
When to choose
- you need 'if-needed' scrolling semantics in browsers that lack support
- you want consistent smooth scrolling behavior across Chrome, Firefox, and Safari
- you need fine-grained control over scroll alignment and boundaries
- you want a tiny, dependency-free scrolling utility
When to avoid
- native Element.scrollIntoView already covers your needs in your target browsers
- you need scroll animation outside the DOM/browser context
- you need a full-featured animation library rather than a scrolling utility
Facets
library · maturity stable
animation web-development frontend browser cross-platform ponyfill smooth-scrolling scrollintoview typescript dom
3 sources
- readme: https://github.com/scroll-into-view/scroll-into-view-if-needed · fetched 2026-08-28 · aa2b94802305
- homepage: https://scroll-into-view.dev · fetched 2026-08-29 · c189c9d38a46
- registry_npm: https://registry.npmjs.org/scroll-into-view-if-needed · fetched 2026-08-29 · 7161938a4b6b
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| scroll-into-view/scroll-into-view-if-needed | main | 67 |
For agents
markdown · JSON · MCP: product_card(name="scroll-into-view/scroll-into-view-if-needed")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem