Gathering detailed insights and metrics for smoothscroll-polyfill
Gathering detailed insights and metrics for smoothscroll-polyfill
Gathering detailed insights and metrics for smoothscroll-polyfill
Gathering detailed insights and metrics for smoothscroll-polyfill
@types/smoothscroll-polyfill
TypeScript definitions for smoothscroll-polyfill
scroll-into-view-if-needed
Ponyfill for upcoming Element.scrollIntoView() APIs like scrollMode: if-needed, behavior: smooth and block: center
smoothscroll-anchor-polyfill
Apply smooth scroll to anchor links to replicate CSS scroll-behavior
smooth-scroll-into-view-if-needed
Ponyfill for smooth scrolling elements into view (if needed!)
npm install smoothscroll-polyfill
Typescript
Module System
Node Version
NPM Version
99.8
Supply Chain
93.7
Quality
79.6
Maintenance
100
Vulnerability
100
License
JavaScript (51.75%)
HTML (48.25%)
Total Downloads
178,533,464
Last Day
15,938
Last Week
559,959
Last Month
2,519,754
Last Year
30,166,820
MIT License
3,844 Stars
136 Commits
335 Forks
42 Watchers
10 Branches
21 Contributors
Updated on Jun 06, 2025
Minified
Minified + Gzipped
Latest Version
0.4.4
Package Id
smoothscroll-polyfill@0.4.4
Size
40.33 kB
NPM Version
5.6.0
Node Version
8.11.1
Published on
Mar 26, 2019
Cumulative downloads
Total Downloads
Last Day
-14%
15,938
Compared to previous day
Last Week
-13.3%
559,959
Compared to previous week
Last Month
1.1%
2,519,754
Compared to previous month
Last Year
-4.6%
30,166,820
Compared to previous year
8
The Scroll Behavior specification has been introduced as an extension of the Window
interface to allow for the developer to opt in to native smooth scrolling. To date this has only been implemented in Chrome, Firefox and Opera.
Check out all the methods covered here: https://iamdustan.github.io/smoothscroll
Download the production ready file here and include it in your project, or install it as a package.
1# npm 2npm install smoothscroll-polyfill --save 3 4# yarn 5yarn add smoothscroll-polyfill
When including the polyfill in a script tag, it will run immediately after loaded.
If you are importing it as a dependency, make sure to call the polyfill
method:
1import smoothscroll from 'smoothscroll-polyfill'; 2 3// kick off the polyfill! 4smoothscroll.polyfill();
In both cases, the script will detect if the spec is natively supported and take action only when necessary.
The code requires requestAnimationFrame polyfill for browsers which don't support it.
If you prefer to always override the native scrolling methods, place this global variable before requiring the module or including the polyfill file.
1window.__forceSmoothScrollPolyfill__ = true;
We strongly recommend not to do this unless your project strongly needs it.
The requirements to contribute are yarn and the latest LTS Node.js version.
First, fork the repository and do yarn install
in the root folder to get all the dependencies to work with. Create a feature branch, write your stuff and run yarn test
to check code style and prevent bugs.
In this project we use Prettier to format the final published code, you can run yarn format
before committing. If you don't, a precommit hook will prevent you from pushing code that hasn't been formatted properly.
Are you done? Awesome, submit a pull request explaining your changes.
This is a polyfill, not library, so make sure the behavior you are introducing is in the spec.
On tests files we are using ES2015, but the polyfill is written in ES5 for browser compatibility.
If you want to watch tests as you write your code run yarn test --watch
.
Successfully working in:
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 9/13 approved changesets -- score normalized to 6
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
49 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-02
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More