scroll-indicator-js

1.0.3 • Public • Published

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>

<!-- ..... -->
datasets Value Default
height px 3px
position top - bottom - left - right top
color hex/rgba/linear linear-gradient(225deg,#ffb938 0%,#ff5729 100%)
reverse true - false false

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i scroll-indicator-js

      Weekly Downloads

      3

      Version

      1.0.3

      License

      ISC

      Unpacked Size

      3.97 kB

      Total Files

      3

      Last publish

      Collaborators

      • lioruby