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

scrolling-based-progressbar

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scrolling-based-progressbar

Progress bar whose value changes based on scrolling

  • 1.21.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
244
decreased by-44.67%
Maintainers
1
Weekly downloads
 
Created
Source

scrolling-based-progressbar

React Progress bar whose value changes based on scrolling

NPM JavaScript Style Guide

Install

npm install scrolling-based-progressbar

Demo

https://progressbar-demo.netlify.com/

Preview

Demo Preview

Usage

import React, { Component } from 'react'

import { ProgressBar } from 'scrolling-based-progressbar';

class Example extends Component {
  render () {
    return (
      <ProgressBar /> 
      or
      <ProgressBar height="4px" color="#1976d2" bgColor="#a7caed" />
    )
  }
}

Default values

color="red"

bgColor="transparent"

height="5px"

borderRadius = '0'

zIndex = '100000000'

top = '0'

left = '0'

position = 'fixed'

ContainerStyle & ProgressBarStyle

Using ContainerStyle & ProgressBarStyle you can define in-line style for ProgressBar

Here Is How


<ProgressBar height="3px"
  ContainerStyle={{backgroundColor:'#a7caed',bottom:'0',top:'none'}} 
  ProgressBarStyle={{backgroundColor:'#1976d2'}} />

Note

Use in each separate component where you want progress bar

Wrong
function App() {
  return (
    <BrowserRouter>
      <ModelManager/>
      <ProgressBar />
      <ScrollToTop>
        <Contactbar />
        <Usermenu />
        <Navbar />
        <Switch>
          <Route path="/" exact component={Home} />
          <Route path="/auth" component={Auth} />
          <Route path="/cart" component={Order} />
          <Route path="/contact" component={Contact} />
          <Route path="/details/:id" component={DetialsProduct} />
        </Switch>
      </ScrollToTop>
    </BrowserRouter>
  );
}
Right

Use in each component( Home , Auth , Order , Contact , DetialsProduct ) separately

License

MIT © ValeedAnjum

Keywords

FAQs

Package last updated on 16 Sep 2020

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