- Vanilla JS, powered by Web Animations API
- No dependencies
- Extremely lightweight: 100 lines of source code, 1.17 KB minified, 0.5 KB gzipped
- Completely customizable: style it with CSS, define custom animation with your own
KeyframeEffect
npm i continuous-top-loading-bar
<body>
<div id="progress-bar"></div>
<main>...</main>
</body
import { ContinuousTopLoadingBar } from "continuous-top-loading-bar";
const bar = document.getElementById('progress-bar')
const loader = new ContinuousTopLoadingBar(bar)
// loader.start()
// loader.done()
See here https://nag5000.github.io/continuous-top-loading-bar