Socket
Socket
Sign inDemoInstall

@nadfri/react-scroll-progress-bar

Package Overview
Dependencies
3
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @nadfri/react-scroll-progress-bar

### Add an progress bar on the top of your page to indicate the position of the scroll page


Version published
Weekly downloads
9
increased by80%
Maintainers
1
Install size
19.1 kB
Created
Weekly downloads
 

Readme

Source

Easy Progress Bar on scroll for react

Add an progress bar on the top of your page to indicate the position of the scroll page

Install

npm i @nadfri/react-scroll-progress-bar

Usage

//Import ProgressBar component
import {ProgressBar} from '@nadfri/react-scroll-progress-bar';

export default function App() {
  return (
    <div style={{height: "200vh"}}>
      <ProgressBar color1="gray" color2="gold" position="fixed" height="4px"/>
      {/*or*/}
      <ProgressBar />
    </div>
  );
}

Default Props

If you use <ProgressBar/> without props

  • color of container will be gray (color1)
  • color of bar will be gold (color2)
  • position of progress bar will be fixed (position)
  • heigth of progress bar will be 4px

Custom Props

  • color1 | color of the container (ex:"gray", "#fff')
  • color2 | color of the progress bar (ex: "red", "rgb(0,0,0)")
  • height | height of the progress bar (ex: "10px", "10%", "1vh")
  • position | Position of the progress bar (ex: "absolute", "fixed", "sticky", "relative")

You can use all css values for this properties.

FAQs

Last updated on 07 Feb 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc