GithubHelp home page GithubHelp logo

cgrcnr / react-native-countdown-circle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mrtoph/react-native-countdown-circle

0.0 0.0 0.0 281 KB

A light-weight countdown circle indicator for React Native.

License: MIT License

JavaScript 100.00%

react-native-countdown-circle's Introduction

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

Name Description Type Required Default Value
seconds The seconds to count down from Number
radius The radius in px of the component (including border) Number
borderWidth The border width in px Number
color The border color String #f00 '#f00'
shadowColor The background color of the border String #999 '#999'
bgColor The inner background color of the component String #e9e9ef '#e9e9ef'
containerStyle The custom styling which will be applied to the container of the Text component Style null
textStyle The custom styling which will be applied to the Text component Style null
updateText A function used to display a different text inside this component. Is called after every second, with the number of elapsed seconds, and the total seconds func (elapsedSecs, totalSecs) => (totalSecs - elapsedSecs).toString()
onTimeElapsed A function being called when the countdown is over func () => null

Author

Christoph Michel

Implementation Details

React Native Progress Circle

License

MIT

react-native-countdown-circle's People

Contributors

mrtoph avatar plouh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.