This is a simple countdown timer react component.
The demo app source code lives inside the src/docs
folder.
npm
npm install react-component-countdown-timer --save
⚠️ Also install react-component-countdown-timer for css
@import "~react-component-countdown-timer/lib/styles.css";
import React from "react";
import CountdownTimer from "react-component-countdown-timer";
class SimpleCountdownTimer extends React.Component {
render() {
var settings = {
count: 5432,
border: true,
showTitle: true,
noPoints: true,
};
return (
<CountdownTimer {...settings} />
);
}
}
OR
import React from "react";
import CountdownTimer from "react-component-countdown-timer";
class SimpleCountdownTimer extends React.Component {
render() {
return (
<CountdownTimer count={5432} border showTitle noPoints />
);
}
}
Name | Type | Default | Description |
---|---|---|---|
className | string | '' |
Additional CSS class for the root DOM node |
id | string | '' |
Additional id for the root DOM node |
count | number | 0 |
The count value of the timer base on second |
border | boolean | false |
If the value is true , it means a react-component-countdown-timer has a border |
showTitle | boolean | false |
If the value is true , it means a react-component-countdown-timer has a title top of each section |
direction | right or left |
left |
Value to be added or subtracted on each step the slider makes. Must be greater than zero, and max - min should be evenly divisible by the step value. When marks is not an empty object, step can be set to null , to make marks as steps. |
noPoints | boolean | false |
If vertical is true , the react-component-countdown-timer will be : between each section . |
color | string | #000 |
|
backgroundColor | string | #fff |
|
responsive | boolean | false |
If true , with is responsive. |
size | number |
18 |
count number font size |
labelSize | number |
12 |
if showTitle is true this set label font size |
responsive | boolean | false |
If true , with is responsive. |
hideDay | boolean | false |
If true , hide day. |
hideHours | boolean | false |
If true , hide hours . |
dayTitle | string | Day |
|
hourTitle | string | Hour |
|
minuteTitle | string | Min |
|
secondTitle | string | Sec |
|
onEnd | Function | () => {} |
react-component-countdown-timer
is released under the MIT license.
All things that you must learn about it to run on the road into the front-end world.
My learning repository, which also contains useful article URLs.
My Personal Site With React and Styled-components🧶
Personal website that written in React.js & Next.js, Also its user interface design is like apps
Dawn is a Dart Web Framework that lets developers to develop UIs with a widget model similar to Flutter. Dawn applications are compiled to JavaScript and are painted using HTML and CSS.
Linked Data Reactor (LD-R)
Toast component for React Native, supports Android, iOS and Web
Manage the Werewolf easier than ever