New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-scroll-progress-read

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-scroll-progress-read

Progress Bar for show position of scroll page

  • 0.0.13
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

React Component for show progress bar connected with the scroll.

When you scroll on the page, the bar indicate the progression on the page.

Doc : https://react-scroll-progress-read.faramazpat.now.sh/

npm package : https://www.npmjs.com/package/react-scroll-progress-read

React version required

Version 16.8 for use React Hook

For include in your project

import ScrollProgressRead from 'react-scroll-progress-read';

...
render() {
  <div>
  <ScrollProgressRead />
  ....
  </div>
}

Props config

By default, the bar take the window height. If you want target an html element, you must indicate the ID of the element in props with "target"

You can change parameter with the props :

  • backgroundColor (string) : color of the container
  • barColor (string) : color of the bar
  • height (string) : height of the component.
  • target (string) : ID of html element
  • refTarget (React.RefObject) : reference to react element

The props aren't required.

if not ref target, the component use target ID and if target is undefined, the component use the document.

import ScrollProgressRead from 'react-scroll-progress-read';

...
render() {
  <div>
  <ScrollProgressRead
    backgroundColor="#CCC"
    barColor="#FFCC00"
    height="5px"
    target="read-container"
    refTarget={refContainer}
  />
  ....
  </div>
}

Keywords

FAQs

Package last updated on 01 Aug 2019

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