WrathChaos / react-native-countdown

Moment based extremely easy to use Countdown for React Native

Home Page:https://freakycoder.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Native Countdown

Battle Tested ✅

Moment based extremely easy to use Countdown for React Native

npm version npm Platform - Android and iOS License: MIT styled with prettier

React Native Countdown

Installation

Add the dependency:

npm i @freakycoder/react-native-countdown

Peer Dependencies

IMPORTANT! You need install them
"moment": ">= 2.24.0",
"moment-duration-format": ">= 2.3.2"

Usage

Import

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

<Countdown
  start={moment(1578240964000)}
  end={moment(1578244564000)}
  fontFamily="BurbankBigCondensed-Black" // All Text Component feature can be send via props OR you can use textStyle
  defaultCountdown=" - / - : - : -"
  format="d[d]  hh:mm:ss"
/>

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

  • LICENSE
  • Typescript
  • Article for Medium
  • BuyMeACoffee Link/Widget

Author

FreakyCoder, kurayogun@gmail.com

License

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

About

Moment based extremely easy to use Countdown for React Native

https://freakycoder.com

License:MIT License


Languages

Language:Java 37.3%Language:JavaScript 17.6%Language:TypeScript 15.1%Language:Ruby 11.8%Language:Objective-C 11.6%Language:Objective-C++ 5.8%Language:Shell 0.9%