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: about 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.
- Host: GitHub
- URL: https://github.com/realKfiros/react-native-countdown-text
- Owner: realKfiros
- Created: 2018-11-27T18:47:34.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-05T17:06:20.000Z (about 4 years ago)
- Last Synced: 2024-12-04T07:24:23.126Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 6
- Watchers: 1
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-react-native - 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. (Components / UI)
- awesome-react-native - 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. (Components / UI)
- awesome-react-native - 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. (Components / UI)
- awesome-react-native - 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. (Components / UI)
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}'`