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
    }

    Keywords

    none

    Install

    npm i scroll-progress-bar

    DownloadsWeekly Downloads

    7

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    6.74 kB

    Total Files

    7

    Last publish

    Collaborators

    • zhangyu1995