Skip to content

Latest commit

History

48 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

react-native-countdown

React Native CountDown

Installation

Run npm install react-native-countdown-component --save OR yarn add react-native-countdown-component --save

Props

NameDescriptionTypeDefault Value
styleOverride the component styleobject{}
digitBgColorDigit background colorstring#FAB913'#FAB913'
digitTxtColorDigit text colorstring#000000'#000000'
timeTxtColorTime labels text colorstring#000000'#000000'
sizeSize of the countdown componentnumber15
untilNumber of seconds to countdownnumber0
onFinishWhat function should be invoked when the time is 0funcnull
onPressWhat function should be invoked when clicking on the timerfuncnull
timeToShowWhat Digits to showarray['D', 'H', 'M', 'S']
labelD/H/M/SText to show in labelstring'Days' / 'Hours' / 'Minutes' / 'Seconds'

Preview

React Native Countdown

Code

importCountDownfrom'react-native-countdown-component';render(){return(<CountDownuntil={10}onFinish={()=>alert('finished')}onPress={()=>alert('hello')}size={20}/>)}

Preview

React Native Countdown

Code

importCountDownfrom'react-native-countdown-component';render(){return(<CountDownuntil={60*10+30}size={30}onFinish={()=>alert('Finished')}digitBgColor={'#fff'}digitTxtColor={'#1CC625'}timeToShow={['M','S']}labelM={'MM'}labelS={'SS'}/>)}

About

React Native CountDown

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages