npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-linear-progressbar

v1.2.0

Published

linear progress bar built using ReactJS

Downloads

18

Readme

react-linear-progressbar

simple and customizable linear progress bar built using ReactJS

Installation

npm i react-linear-progressbar --save

Usage

import React, Component from 'react';
import Progressbar from 'react-linear-progressbar';

export default function MyComponent (props) {
    const myConfig = {
        containerStyle :{},
        progressStyle:{},
        stripe: false,
        animate: false,
        showLabel: true,
        width: 40,
        label: 40 + '%'
    }
    return <Progressbar config = {myConfig}/>;
}

Options

all the below configuration options (settings) should be passed as props in the form of an object named 'config' as shown in the example above.

  1. containerStyle : either a css className or an object of styles. This indicates the styles for progress bar container

    • Examples
    1. passing a css classname
    
    <!-- style -->
    .sampleStyle {
        background-color: #000 !important;
    }
    
    <!-- config -->
    myConfig = {
        containerStyle : 'sampleStyle'
        .....
    }
    1. passing an object of styles
    
    <!-- style -->
    const sampleStyle =  {
       'backgroundColor': '#000 !important';
    }
    
    <!-- config -->
    myConfig = {
       containerStyle : sampleStyle
       .....
    }
  2. progressStyle : similar to containerStyle property above, progressStyle is also either a css className or an object of styles. This indicates the styles for the progress bar (for example, color of the progress)

  3. stripe : a boolean to specify the progress should have stripes

    • possible values: true | false ; false by default
  4. animate : a boolean to indicate if the the progress bar should have animation effect

    • possible values: true | false ; false by default
  5. showLabel : a boolean to indicate if the the progress bar percentage should be shown

    • possible values: true | false ; true by default
  6. width : a number which denotes the progress percentage

    • possible values: any number >=0 && <=100
  7. label : a string value which will display on the progress bar

    • possible values: any string ; width + '%' by default

Test the code

  1. git clone https://github.com/yogeshkumar05/react-linear-progressbar.git
  2. npm install
  3. npm start
  4. launch http://localhost:3001/

Demo is published at

https://yogeshkumar05.github.io/react-linear-progressbar/