Socket
Book a DemoInstallSign in
Socket

react-native-circle-timer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-circle-timer

A react native component to render Count Down timer

1.0.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

React-Native-Circle-Timer

The React Native Native iOS and Android Circle timer or countdown timer which renders the Circular countdown timer with user specific time and colors. This renders the timer with Hours & Minutes within it

See Example.js for example

Install

npm install --save react-native-circle-timer

How to use

This shows the default properties.

PropertyTypeDefaultRequiredDescription
radiusnumber40YESTo change the radius of timer
secondsnumber60YESSet the timer in seconds
borderWidthnumber10NOBorder witdth of the timer
showSecondboolfalseNORender Elapsed time when set to TRUE
borderColorstring#0E3657NOSet the border color of the timer
textStylestylenullNORender the elapsed time with user cutomization
stylestylenullNORender the timer with user cutomization
circleColorstring#FFFFFFNOChange the color of timer circle
borderBackgroundColorstring#A8C3BCNOColor of the left time in Timer
onTimeElapsedfuntionnullNOCalled when the timer is finished

import React, { View } from 'react-native';
import CircleTimer from 'react-native-circle-timer';

class ComponentClass extends React.Component {

    constructor(props) {
        super();
    }


    render() {
        return (
            <View
                style={{backgroundColor: "#06566e", justifyContent: 'center', alignItems: 'center', flex: 1}}>

                <CircleTimer
                        radius={80}
                        borderWidth={10}
                        seconds={1800}
                        borderColor={'#F5F5F5'}
                        borderBackgroundColor={"#FF0000"}
                        onTimeElapsed={() => {
                            console.log('Timer Finished!');
                        }}
                        showSecond={true}
                    />
            </View>
        )
    }
}

Keywords

react-native

FAQs

Package last updated on 22 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.