1.2.2 • Published 7 years ago

react-native-av-countdown-circle v1.2.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

license Version npm Twitter Follow

React Native Countdown Circle

React Native Countdown Circles

Features

  • Custom colors
  • Custom size and border radius
  • Light-weight: No other dependencies besides react-native
  • Performant and Smooth: Uses React Native's Animated library

Installation

yarn add react-native-countdown-circle

or

npm install --save react-native-countdown-circle

Usage

import CountdownCircle from 'react-native-countdown-circle'

render() {
    return (
        <CountdownCircle
            seconds={10}
            radius={30}
            borderWidth={8}
            color="#ff003f"
            bgColor="#fff"
            textStyle={{ fontSize: 20 }}
            onTimeElapsed={() => console.log('Elapsed!')}
        />
    )
}

Props

NameDescriptionTypeRequiredDefault Value
secondsThe seconds to count down fromNumber
radiusThe radius in px of the component (including border)Number
borderWidthThe border width in pxNumber
colorThe border colorString#f00 '#f00'
shadowColorThe background color of the borderString#999 '#999'
bgColorThe inner background color of the componentString#e9e9ef '#e9e9ef'
containerStyleThe custom styling which will be applied to the container of the Text componentStylenull
textStyleThe custom styling which will be applied to the Text componentStylenull
updateTextA function used to display a different text inside this component. Is called after every second, with the number of elapsed seconds, and the total secondsfunc(elapsedSecs, totalSecs) => (totalSecs - elapsedSecs).toString()
onTimeElapsedA function being called when the countdown is overfunc() => null

Author

Christoph Michel

Implementation Details

React Native Progress Circle

License

MIT