Skip to content

Ferrick90/react-native-timer-countdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

React Native Timer Countdown

A customizable countdown component for React Native.

Install

npm install --save react-native-timer-countdown`

or

yarn add react-native-timer-countdown

Usage

import TimerCountdown from 'react-native-timer-countdown'

render() {
    return (
        <TimerCountdown
            initialSecondsRemaining={360}
            onTick={() => console.log('tick')}
            onTimeElapsed={() => console.log('complete')}
            allowFontScaling={true}
            style={{ fontSize: 20 }}
        />
    )
}

Props

Name Description Type Required Default Value
initialSecondsRemaining The time remaining for the countdown (in ms) number
interval The time between timer ticks (in ms). number 1000ms
allowFontScaling to allow font scaling bool false
style The custom styling which will be applied to the Text component style
formatFunc A function that formats the secondsRemaining func
onTick A function to call each tick func
onTimeElapsed A function to call when the countdown completes func

Author

Avid21

License

MIT

About

A customizable countdown timer component for React Native.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published