1.0.6 • Published 3 years ago
react-custom-scroll-progress v1.0.6
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
Stackblitz Demo
Types of progressbars
<ProgressBar />Props Description PropType hideNativeScrollbarto hide native scrollbar booleanyScrollBarPositionto 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 thumb objectyScrollBarTrackStylestyle to add custom styles to vertical scollbar track objectxScrollBarThumbStylestyle to add custom styles to horizontal scollbar thumb objectxScrollBarTrackStylestyle to add custom styles to horizontal scollbar track objectonScrollemits the percentage of scroll for both vertical and horizontal callback<CircularProgressBar />Props Description PropType hideNativeScrollbarto hide native scrollbar booleanverticalScrollColorcolor string to add custom styles to circular progressbar which shows a vertical scroll percent stringhorizontalScrollColorcolor string to add custom styles to circular progressbar which shows a horizontal scroll percent stringverticalScrollTrackStylestyle to add custom styles to vertical scollbar track objecthorizontalScrollTrackStylestyle to add custom styles to horizontal scollbar track objectcurrentStateto show collapsed or slit varient. 'split','collapse'hideVerticalScrollProgressto hide vertical scroll progress booleanhideHorizontalScrollProgressto hide horizontal scroll progress booleanautoSplitto auto split vertical and horizontal progressbar when user scrolls on page booleanautoHideto auto hide the progress bar when there is no scroll interaction booleanonScrollemits the percentage of scroll for both vertical and horizontal callback