scroll-progress-bar
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

scroll-progress-bar

npm-version bundlesize-js-image

A progress bar for scroll, support SSR.

Install

npm install scroll-progress-bar
yarn add scroll-progress-bar

Usage

import progressBar from 'scroll-progress-bar';
import "scroll-progress-bar/style.css";

// show scroll progress bar
progressBar.show();
// hide scroll progress bar
progressBar.hide();
// set scroll progress bar configuration
progressBar.setConfig({
    debounce: true,
})

configuration

export interface ScrollProgressConfig {
  // element id
  id?: string
  // element scroll offset
  offset?: number
  // scroll debounce
  debounce?: boolean
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.0
    0
  • 1.1.0
    0
  • 1.0.0
    0
  • 0.0.0
    1

Package Sidebar

Install

npm i scroll-progress-bar

Weekly Downloads

1

Version

1.2.0

License

MIT

Unpacked Size

6.74 kB

Total Files

7

Last publish

Collaborators

  • zhangyu1995