Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wrathchaos/react-native-countdown

Moment based extremely easy to use Countdown for React Native
https://github.com/wrathchaos/react-native-countdown

android apple freakycoder front-end google ios javascript kuray library mobile mobile-app mobile-app-development react react-native reactjs

Last synced: 5 days ago
JSON representation

Moment based extremely easy to use Countdown for React Native

Awesome Lists containing this project

README

        

React Native Countdown

[![Battle Tested ✅](https://img.shields.io/badge/-Battle--Tested%20%E2%9C%85-03666e?style=for-the-badge)](https://github.com/WrathChaos/react-native-countdown)

[![Moment based extremely easy to use Countdown for React Native](https://img.shields.io/badge/-Moment%20based%20extremely%20easy%20to%20use%20Countdown%20for%20React%20Native-lightgrey?style=for-the-badge)](https://github.com/WrathChaos/react-native-countdown)

[![npm version](https://img.shields.io/npm/v/@freakycoder/react-native-countdown.svg?style=for-the-badge)](https://www.npmjs.com/package/freakycoder/react-native-countdown)
[![npm](https://img.shields.io/npm/dt/@freakycoder/react-native-countdown.svg?style=for-the-badge)](https://www.npmjs.com/package/freakycoder/react-native-countdown)
![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%20iOS-blue.svg?style=for-the-badge)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=for-the-badge)](https://github.com/prettier/prettier)


React Native Countdown

# Installation

Add the dependency:

```js
npm i @freakycoder/react-native-countdown
```

## Peer Dependencies

###### IMPORTANT! You need install them

```js
"moment": ">= 2.24.0",
"moment-duration-format": ">= 2.3.2"
```

# Usage

## Import

```js
import moment from "moment";
import Countdown from "react-native-countdown";
```

## Usage

All Text Component feature can be send via props OR you can use textStyle

```jsx

```

# Configuration - Props

Check the example for the customizable `format` and `defaultCountdown` props.

| Property | Type | Default | Description |
| ---------------- | :-----: | :-------: | ------------------------------------------------------- |
| start | boolean | true | make the button outline |
| end | boolean | false | make the button with a solid background and a shadow |
| textStyle | boolean | false | make the button with a gradient background and a shadow |
| defaultCountdown | string | - : - : - | default countdown format before the countdown starts |
| format | string | hh:mm:ss | set your own format for the countdown |

## Roadmap

- [x] ~~LICENSE~~
- [ ] Typescript
- [ ] Article for Medium
- [ ] BuyMeACoffee Link/Widget

## Author

FreakyCoder, [email protected]

## License

React Native Countdown is available under the MIT license. See the LICENSE file for more info.