@acrool/react-flip-countdown
Version:
Flip countdown library based for Reactjs
74 lines (45 loc) • 2.52 kB
Markdown
# Acrool React Flip Countdown
<a href="https://acrool-react-flip-countdown.pages.dev/" title="Acrool React Block - This is a block function for React development loading block">
<img src="https://raw.githubusercontent.com/acrool/acrool-react-flip-countdown/main/example/public/og.png" alt="Acrool React Block Logo"/>
</a>
<p align="center">
A simple and animated flip countdown timer for React.
</p>
<div align="center">
[](https://www.npmjs.com/package/@acrool/react-flip-countdown)
[](https://github.com/acrool/@acrool/react-flip-countdown/blob/main/LICENSE)
[](https://github.com/acrool/react-flip-countdown/blob/main/LICENSE)
[](https://www.npmjs.com/package/@acrool/react-flip-countdown)
[](https://www.npmjs.com/package/@acrool/react-flip-countdown)
</div>
## Features
- Flip animation for hours, minutes, and seconds
- Support `endTime` as countdown target
- Supports 3-digit hours: the display shows 99, and starts flipping down when the hour drops below 99
- Lightweight and easy to use
## Install
```bash
yarn add @acrool/react-flip-countdown
```
## Usage
add in your index.tsx
```tst
import "@acrool/react-flip-countdown/dist/index.css";
```
then in your page
```tsx
import FlipCountdown from '@acrool/react-flip-countdown';
const Example = () => {
return (
<FlipCountdown endTime="2025/05/05 18:50:53"/>
);
};
```
There is also a example that you can play with it:
[](https://acrool-react-flip-countdown.pages.dev)
## Props
| Prop | Type | Default | Required | Description |
|:----------|------------|---------|----------|-------------------------------------------------------------------------------|
| `endTime` | `string ` | – | Yes | Countdown target time. Accepts a date string or a format supported by `dayjs` |
## License
MIT © [Acrool](https://github.com/acrool)