Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-page-scroll-progress-bar

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-page-scroll-progress-bar

Page scroll progress bar

  • 3.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

React Page Scroll Progress Bar

Scroll bar to show the scroll progress of the page at the top of the page.

page-Scroll

Installation

npm users

  npm install react-page-scroll-progress-bar

yarn users

  yarn add react-page-scroll-progress-bar

Usage

Import the component

import PageScrollProgressBar from "react-page-scroll-progress-bar";
Optional props:
ParameterDefaultDescription
containerdocument.bodyThe reference of the parent most element of your react app.
color#eb5757Color of the progress bar as a hex string
bgColor#f2f2f2Color of the progress bar background as a hex string
height0.25rem or 4pxHeight of the progress bar
top0Top position

Example with document body as the container -

const App = () => {
  return (
    <PageScrollProgressBar color="#00FFFF" bgColor="transparent" height="6px" />
    <div className="App">
      APP
    </div>
  )
}

Example with app container element -

const App = () => {

  const AppRef = useRef(null);

  return (
    <PageScrollProgressBar container={AppRef.current} color="#00FFFF" bgColor="#f2f2f2" height="6px" />
    <div className="App" ref={AppRef}>
      APP
    </div>
  )

}

Checkout the Example app

Checkout the Source code

portfolio linkedin

Keywords

FAQs

Package last updated on 15 Jul 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc