
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-countplus
Advanced tools
A flexible and customizable React component for animated number counting.
A flexible and customizable React component for animated number counting.
Install the package using npm:
npm install react-countplus
Here's a basic example of how to use the CountPlus component:
import { useState } from "react";
import { CountPlus } from "react-countplus";
const App = () => {
const [key, setKey] = useState(0);
const handleRestart = () => {
setKey((prevKey) => prevKey + 1);
};
return (
<div style={{ textAlign: "center", padding: "50px" }}>
<h1>CountPlus Demo</h1>
<div style={{ fontSize: "48px", marginBottom: "20px" }}>
<CountPlus
key={key}
start={0}
end={1000}
duration={5}
separator=","
decimals={2}
decimal="."
prefix="$"
suffix=" USD"
onStart={() => console.log("Animation started")}
onUpdate={(value) => console.log("Current value:", value)}
onEnd={() => console.log("Animation ended")}
/>
</div>
<button onClick={handleRestart}>Restart Animation</button>
</div>
);
};
export default App;
The CountPlus component accepts the following props:
| Prop Name | Type | Description | Default Value |
|---|---|---|---|
start | number | The number to start counting from | 0 |
end | number | The final number to count up to (required) | - |
duration | number | Duration of the count animation in seconds | 2 |
decimals | number | Number of decimal places to show | 0 |
separator | string | Character used as the thousands separator | "," |
decimal | string | Character used as the decimal point | "." |
prefix | string | String to display before the number | "" |
suffix | string | String to display after the number | "" |
delay | number | Delay in milliseconds before starting the animation | 0 |
onStart | function | Callback function called when the animation starts | - |
onUpdate | function | Callback function called on each update with the current value | - |
onEnd | function | Callback function called when the animation completes | - |
This project is licensed under the MIT License.
Contributions are welcome! Please open an issue or submit a pull request if you'd like to contribute to this project.
If you encounter any issues or have questions, please file an issue on the GitHub repository.
FAQs
A flexible and customizable React component for animated number counting.
We found that react-countplus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.