0.0.3 • Published 9 months ago

voothanh-react-countdown-flip v0.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

voothanh-react-countdown-flip

A 3D animated flip countdown component for React.

Install

npm install --save voothanh-react-countdown-flip

Or

yarn add voothanh-react-countdown-flip

Props

The FlipClockCountdown has all properties of div and additional props below

NameTypeRequiredDefaultDescription
targetDate|string|numberyesDate or timestamp in the future.
displayobjectnoConfig Timer Unit displays
|yearsbooleannoundefinedDisplay Years
|monthsbooleannoundefinedDisplay Months
|daysbooleannoundefinedDisplay Days
|hoursbooleannoundefinedDisplay Hours
|minutesbooleannoundefinedDisplay Minutes
|secondsbooleannoundefinedDisplay Seconds
titlesobjectnoConfig Unit titles
|yearsstringnoYearsTitle Years
|monthsstringnoMonthsTitle Months
|daysstringnoDaysTitle Days
|hoursstringnoHoursTitle Hours
|minutesstringnoMinutesTitle Minutes
|secondsstringnoSecondsTitle Seconds
onCompletefuncnoCallback when countdown ends

Usage

Basic usage

import React from 'react';
import { Timer } from "voothanh-react-countdown-flip";

const Example = () => {
    return <Timer target={'2026-01-17 12:00:00'}
                  display={{
                      [TimeUnit.Seconds]: true,
                      [TimeUnit.Hours]: true,
                      [TimeUnit.Minutes]: true
                  }}
    />;
}
0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

10 months ago