1.0.6 • Published 2 years ago

react-custom-scroll-progress v1.0.6

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

react-custom-scroll-progress

Usage

Installation

npm i react-custom-scroll-progress

Import styles in App.js

import 'react-custom-scroll-progress/dist/index.css'

This assumes that you are using react project to consume this library.

Storybook Demo

Storybook Demo Link

Stackblitz Demo

Stackblitz Demo Link

Types of progressbars

  1. <ProgressBar />

    PropsDescriptionPropType
    hideNativeScrollbarto hide native scrollbarboolean
    yScrollBarPositionto set scrollbar position for vertical scroll.'top' , 'right' , 'bottom' , 'left'
    xScrollBarPositionto set scrollbar position for horizontal scroll.'top' , 'right' , 'bottom' , 'left'
    yScrollBarThumbStylestyle to add custom styles to vertical scollbar thumbobject
    yScrollBarTrackStylestyle to add custom styles to vertical scollbar trackobject
    xScrollBarThumbStylestyle to add custom styles to horizontal scollbar thumbobject
    xScrollBarTrackStylestyle to add custom styles to horizontal scollbar trackobject
    onScrollemits the percentage of scroll for both vertical and horizontalcallback
  2. <CircularProgressBar />

    PropsDescriptionPropType
    hideNativeScrollbarto hide native scrollbarboolean
    verticalScrollColorcolor string to add custom styles to circular progressbar which shows a vertical scroll percentstring
    horizontalScrollColorcolor string to add custom styles to circular progressbar which shows a horizontal scroll percentstring
    verticalScrollTrackStylestyle to add custom styles to vertical scollbar trackobject
    horizontalScrollTrackStylestyle to add custom styles to horizontal scollbar trackobject
    currentStateto show collapsed or slit varient.'split' , 'collapse'
    hideVerticalScrollProgressto hide vertical scroll progressboolean
    hideHorizontalScrollProgressto hide horizontal scroll progressboolean
    autoSplitto auto split vertical and horizontal progressbar when user scrolls on pageboolean
    autoHideto auto hide the progress bar when there is no scroll interactionboolean
    onScrollemits the percentage of scroll for both vertical and horizontalcallback

Note: The parent html element of progressbar component or the progressbar component itself should have some width and height specified to show the progress bar.

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago