Gathering detailed insights and metrics for @coderv12/react-animate-number
Gathering detailed insights and metrics for @coderv12/react-animate-number
Gathering detailed insights and metrics for @coderv12/react-animate-number
Gathering detailed insights and metrics for @coderv12/react-animate-number
npm install @coderv12/react-animate-number
Typescript
Module System
Node Version
NPM Version
62.5
Supply Chain
95.6
Quality
75.2
Maintenance
100
Vulnerability
100
License
Total Downloads
1,548
Last Day
1
Last Week
18
Last Month
58
Last Year
1,236
Minified
Minified + Gzipped
Latest Version
1.0.2
Package Id
@coderv12/react-animate-number@1.0.2
Unpacked Size
11.85 kB
Size
4.20 kB
File Count
6
NPM Version
9.6.7
Node Version
18.17.0
Published on
Apr 26, 2024
Cumulative downloads
Total Downloads
1
26
number animation
1npm i @coderv12/react-animate-number
1import React from "react"; 2import AnimatedNumbers from "@hardiknaik/react-animate-number"; 3 4const App = () => { 5 return ( 6 <AnimatedNumbers 7 number={444} // specify the number 8 className="text-yellow" // specify the Class name (Optional) 9 style={{ background: "red" }} // specify the Style (Optional) 10 decimal={2} // specify the Decimal Places default to 0 (Optional) 11 comma //specify the if want comma seperated default to false (Optional) 12 /> 13 ); 14}; 15 16export default App;
1import React, { Component } from "react"; 2import AnimatedNumbers from "@hardiknaik/react-animate-number"; 3 4class Example extends Component { 5 render() { 6 return ( 7 <AnimatedNumbers 8 number={444} // specify the number 9 className="text-yellow" // specify the Class name (Optional) 10 style={{ background: "red" }} // specify the Style (Optional) 11 decimal={2} // specify the Decimal Places default to 0 (Optional) 12 comma //specify the if want comma seperated default to false (Optional) 13 /> 14 ); 15 } 16}
Change the below css variale to modify the colour and animation speed
1:root { 2 /* Change the Animation Speed in ms or s */ 3 --duration: 500ms; 4 /* Change the colour of the number when number will be incrementing */ 5 --increment: #00b200; 6 /* Change the colour of the number when number will be decrementing */ 7 --decerement: red; 8}
Available options with example values:
1<AnimatedNumbers 2 number={444} 3 className="text-yellow" 4 style={{ background: "red" }} 5 decimal={2} 6 comma 7/>
Parameter | Type | Required | Defaults | Description |
---|---|---|---|---|
number | Number | yes | - | Provide the number you want to animate. |
className | String | no | - | Provide the Class Name. |
style | CSS Object | no | - | Provide the Style. |
decimal | Number | no | 0 | Provide the Decimal places you want to show to the number. |
comma | Boolean | no | false | Provide the Comma seperation if you want. |
MIT © Hardik Naik
No vulnerabilities found.
No security vulnerabilities found.
Last Day
0%
1
Compared to previous day
Last Week
-10%
18
Compared to previous week
Last Month
-60%
58
Compared to previous month
Last Year
296.2%
1,236
Compared to previous year