react-native-flip-timer-fixed

1.0.33 • Public • Published

A Flip timer implementation in React Native.

Since MatrixMath is no longer supported on React Native, I attempted to address the issue in this repository.

Show Cases

IOS Android
IOS Android

Getting Started

Installation

$ npm i react-native-flip-timer-fixed

Basic Usage

import React, {useState} from 'react';
import {SafeAreaView, ScrollView, StyleSheet, View} from 'react-native';
import {Timer} from 'react-native-flip-timer-fixed';

function App() {
  const [play, setPlay] = useState(true);

  return (
    <SafeAreaView>
      <ScrollView>
        <View style={styles.container}>
          <Timer time={500000} play={play} />
        </View>
      </ScrollView>
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  container: {
    display: 'flex',
    flex: 1,
    backgroundColor: 'white',
  },
});

export default App;

Properties

Timer Props

Prop Default Type Description
time required string / number Time (in seconds)
play true bool Play the timer
wrapperStyle {} object Wrapper for the Timer
showCircles true bool display dots
flipNumberProps {...} defaults Flip Number Props

Flip Number Props

Prop Default Type Description
number required string / number Number Input
unit seconds hours / minutes / seconds Number Input Unit
size number deviceWidth / 6 Size of the card
perspective 250 number Perspective
numberWrapperStyle {} object Wrapper Style
cardStyle {} object Card Style
flipCardStyle {} object Flip Card Style
numberStyle {} object Number Style

Todos

  • Full Coverage Tests for the Components
  • Support for Labels

Contribution

thanks to - @pritishvaidya.

https://github.com/pritishvaidya/react-native-flip-timer

Questions

Feel free to contact me or create an issue

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-flip-timer-fixed

Weekly Downloads

4

Version

1.0.33

License

none

Unpacked Size

3.72 MB

Total Files

76

Last publish

Collaborators

  • ayoub_mmall
  • basichealin