1.0.3 • Published 2 years ago

scroll-indicator-js v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Scroll Indicator JS

A simple vanilla JS scroll indicator. No dependencies, best performances.

ezgif-4-f043ff0fe8

Get Started

With yarn

yarn add scroll-indicator-js

With npm

npm i scroll-indicator-js

To use it in your app

// main.js
import scrollIndicator from 'scroll-indicator-js'


scrollIndicator() // Start the scroll indicator on all .scroll-indicator classes

Usage

<!-- On the top of your page -->
<div class="scroll-indicator" data-height="5px" data-position="bottom"></div>

<!-- ..... -->
datasetsValueDefault
heightpx3px
positiontop - bottom - left - righttop
colorhex/rgba/linearlinear-gradient(225deg,#ffb938 0%,#ff5729 100%)
reversetrue - falsefalse