Socket
Socket
Sign inDemoInstall

react-progress-timer

Package Overview
Dependencies
8
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-progress-timer

This react component will automatically calculate the time to complete a progress bar by percentage changing speed.


Version published
Weekly downloads
66
decreased by-42.11%
Maintainers
1
Install size
182 kB
Created
Weekly downloads
 

Readme

Source


Travis:Status Travis:Status Code Style: Prettier NPM: Version


This react component will automatically calculate the time to complete a progress bar by percentage changing speed. You want supply only the current percentage as a prop.

Features

  • Calculate the time by percentage changing speed or average.
  • Automatically reducing the time even percentage will not changed.

Watch Demo >>

Installation

You can install this component using yarn or npm

//yarn
$ yarn add react-progress-timer

//npm
$ npm install react-progress-timer --save

Usage

import ProgressTimer from 'react-progress-timer';

...
	<ProgressTimer
		percentage={percent}
	/>

Documentation

Please provide following props. Props that marked with leading (*) are required.

PropDescriptionType
*percentageCurrent percentage of the progressnumber
initialTextText to display when initializing. Default is Initializingstring
completedTextText to display after completed the task. Default is Completedstring
decreaseTimeWith this prop time will automatically decreasing even percentage not changed. By default this feature is enabled.boolean
calculateByAverageCalculating time by average speed. By default calculating the speed by current speedboolean
formatFormat to display the remaining time. Default:- Completing in {value} {unit}. You can also use the {percentage} placeholder.string
formatterYou can use your own formatter to format your string. Supply time in nano second to first parameter.(time:number)=>string
rollingAverageWindowSizeWhen calculating by current speed, this specifies how many past values will be considered as "current". Default is 1number

Developing

  1. Clone the repository
$ git clone https://github.com/whizsid/react-progress-timer`
  1. Install the dependencies
$ cd react-progress-timer
$ yarn
  1. Start the development server
yarn start

Contributing

Please lint your code before made a PR.

$ yarn lint

Always follow prettier code styles and check before making your PR.

$ yarn prettier

I will reply to all PRs when I have a free time. Issues and stars also welcome.

Keywords

FAQs

Last updated on 04 Sep 2020

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