Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
react-animated-progress-bar
Advanced tools
Readme
Animated progress bar using react
This package allows you to customize both circular and rectangular progress bar to various colors and sizes that suits your application or design.
For example
const myRef = document.querySelector('.scrollable-div')
<ProgressBar width="230" trackWidth="13" percentage={score} scrollArea={myRef} />
Otherwise if scrollArea is not defined, document reference object is used.
To use package, Start by installing package
on your react project file
import ProgressBar from 'react-animated-progress-bar';
<ProgressBar width="230" trackWidth="13" percentage="60" />
Set the rect props on the component to true
import ProgressBar from 'react-animated-progress-bar';
<ProgressBar
width="400px"
height="10px"
rect
fontColor="gray"
percentage="70"
rectPadding="1px"
rectBorderRadius="20px"
trackPathColor="transparent"
bgColor="#333333"
trackBorderColor="grey"
/>
width (must be a string): width of the progressbar in rectangle type and diameter for circular type,
percentage (must be a string): percentage of the progress bar
height (must be a string): height for rectangular bar. Needed only in rectangular type
rectPadding (must be a string): Padding around rectangular bar,
trackBorderColor (must be a string): Border color of the track
fontColor (must be a string): Percent font color
rectBorderRadius (must be a string): border radius of rectangular bar
trackPathColor (must be a string): color of the track path
hollowBackgroundColor (must be a string): required only in circular bar. it gives the background color of the circle
scrollArea (must be a dom element): the scrollable area. By default it is document
defColor (must be an object); defines custom color for each level of the percentage ( poor, fair, good, excellent)
Score | Level | Color |
---|---|---|
poor | 0 - 25 | #F32013 |
fair | 25 - 50 | #FF6700 |
good | 50 - 70 | #FFD900 |
excellent | 70 - 100 | #48AE2C |
const myRef = document.querySelector('.scrollable-div')
<ProgressBar
width="500px"
height="10px"
fontColor="white"
trackWidth="10"
percentage="40"
trackPathColor="grey"
trackBorderColor="black"
hollowBackgroundColor="#333333"
defColor={{
fair: 'orangered',
good: 'yellow',
excellent: 'green',
poor: 'red',
}}
scrollArea={myAppRef}
/>
FAQs
animated progress bar with react
The npm package react-animated-progress-bar receives a total of 103 weekly downloads. As such, react-animated-progress-bar popularity was classified as not popular.
We found that react-animated-progress-bar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.