Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@tomik23/react-circular-progress-bar
Advanced tools
React library to help developers to draw animated, cross-browser, highly customizable progress circles using SVG and plain JavaScript.
See the demo - example
yarn add @tomik23/react-circular-progress-bar
# or
npm install @tomik23/react-circular-progress-bar
import { CircularProgressBar } from '@tomik23/react-circular-progress-bar'
// available control variables
const props = {
percent: 60, // is require
colorSlice: '#00a1ff',
colorCircle: '#00a1ff',
fontColor: '#365b74',
fontSize: '1.6rem',
fontWeight: 400,
size: 200,
stroke: 10,
strokeBottom: 5,
opacity: 10,
speed: 60,
round: true,
number: true,
linearGradient: ["#ffff00", "brown"]
}
<CircularProgressBar {...props} />
If you want to update component you have to add
id
to each of them
const config = {
id: 0, // important
percent: 50,
colorSlice: '#E91E63',
}
function App() {
const [update, setUpdate] = useState(config);
useEffect(() => {
const interval = setInterval(() => {
setUpdate({
...config,
id: 0, // we indicate which component we want to change
percent: Math.floor(Math.random() * 100 + 1),
});
}, 3000);
return () => clearInterval(interval);
}, []);
const newObject = { ...config, ...update };
return (
<div>
<CircularProgressBar {...newObject} />
</div>
);
}
props | type | default | require | description |
---|---|---|---|---|
percent | number | ✔ | Represents the progress bar and animation of the animation progress expressed by a number e.g. 65% | |
id | number | If you want to update a component, you need to add an id to each of them. Also when you want to display several components with different gradients - linearGradient | ||
colorSlice | string | '#00a1ff' | Progress layer color and background "#ffff00","brown" * | |
colorCircle | string | '#00a1ff' | Bottom circle color Font "#ffff00","brown" * | |
stroke | number | 10 | Stroke width, chart thickness | |
strokrBottom | number | 10 | If "strokBottom" is set, it is used to generate a background circle size | |
round | boolean | false | Path rounding | |
speed | number | 60 | Animation speed, 60fps by default | |
opacity | number | 10 | Opacity box-shadow, 10 = 1, 9 = 0.9 ... 1 = 0.1 | |
number | boolean | true | Add props number and set to false to hide the number with percent | |
size | number | 200 | Size progress bar width and height in px | |
fontSize | string | 1.6rem | Font size. The font can be shown in units rem, em, px ... | |
fontWeight | number | 400 | 400, 600, ... | |
fontColor | string | '#365b74' | Font color "#ffff00","brown" * | |
linearGradient | array | Array of colors "lineargradient": "#ffff00","brown" * |
IE / Edge | Firefox | Chrome | Opera | Vivaldi |
---|---|---|---|---|
IE11+, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
FAQs
A circular progress bar in svg
The npm package @tomik23/react-circular-progress-bar receives a total of 169 weekly downloads. As such, @tomik23/react-circular-progress-bar popularity was classified as not popular.
We found that @tomik23/react-circular-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.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.