Ecosyste.ms: Awesome

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

https://github.com/realKfiros/react-native-countdown-text

A React Native component that converts a timestamp of a future date to a readable countdown clock, based on a format.
https://github.com/realKfiros/react-native-countdown-text

Last synced: 2 months ago
JSON representation

A React Native component that converts a timestamp of a future date to a readable countdown clock, based on a format.

Lists

README

        

# react-native-countdown-text

[![npm version](https://badge.fury.io/js/react-native-countdown-text.svg)](https://badge.fury.io/js/react-native-countdown-text)

A React Native component that converts a timestamp of a future date to a readable countdown clock, based on a format.

## Installation

```
npm install --save react-native-countdown-text
```

## Usage

```js
import React, { Component } from 'react';
import { Countdown } from 'react-native-countdown-text';

export default class App extends Component {
render() {
return
}
}
```

## Properties

| Name | Type | Default | Description |
|---|---|---|---|
|**`format`**|`string`| `{d}:{h}:{m}:{s}` |The format that will be applied to the milliseconds|
|**`finishTime`**|`number`| **REQUIRED** |The future date timestamp|
|**`textStyle`**|`object`||The style that will be applied to the countdown text|

### `format` examples

* `'{d} days, {h} hours, {m} minutes, {s} seconds'`
* `'{h}:{m}:{s}'`
* `'{d} days, {h}:{m}:{s}'`
* `'{h}:{s}'`