Customizable React component for create a customizable scroll bar indicator. It shows a visual representation of the user's scrolling progress.
See Demo here
To install run:
npm i scroll-bar-indicator
or
yarn add scroll-bar-indicator
Import the component:
import ScrollBarIndicator from 'scroll-bar-indicator';
Add the component and pass your custom props:
<ScrollBarIndicator
barColor="#b3b3b3"
barHeight = "2rem",
indicatorColor="#8e32ff"
infoColor="#333333"
showInfo={true},
info="Page"
/>
Prop | Type | Default Value | Description |
---|---|---|---|
barColor | String | #b3b3b3 | Color of the scroll bar |
barHeight | String | 2rem | Defines the bar height. |
indicatorColor | String | #8e32ff | Color of the scroll indicator |
infoColor | String | #333333 | Color of the scroll info text |
showInfo | Boolean | True | Whether to display the scroll info text |
info | String | Page | Text to display info below the component |
Contributions are welcome.
- Fork the repository
- Create your feature branch (
git checkout -b feature/my-feature
) - Commit your changes (
git commit -m 'commit message'
) - Push to the branch (
git push origin feature/my-featuree
) - Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Issues, suggestions, or feedback, create an issue.