1.2.8 • Published 4 years ago

react-better-countdown v1.2.8

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

react-better-countdown

react-better-countdown is a simple count down component using react.

Installation

npm install react-better-countdown --save

Usage

import Countdown from 'react-better-countdown'

<Countdown count={Date.now() + 1000} className="count-wrapper" style={{color: 'red'}} dayText="天" callback={() => {}} />
PropTypeDefaultDescription
countnumberDate.now()the timestamp in the future, Date.now() is neccesarry, unit is milliseconds
dayTextstring | ReactNode'day'the text nearby day,dayText="天" means 10天10:33:22
hourTextstring | ReactNode':'the text nearby day,hourText="时" means 10天10时33:22
minuteTextstring | ReactNode':'the text nearby day,minuteText="分" means 10天10时33分22
secondTextstring | ReactNode''the text nearby day,secondText="秒" means 10天10时33分22秒
callbackfunction()=>{}when count turns to zero, callback executes
classNamestring''the class of the wrapper element
styleobject{}custom style on the wrapper element

Styles

react-better-countdown can be used with your own custom styles.

1.2.8

4 years ago

1.2.7

4 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago