npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hasthiya_/flip-clock

v1.1.1

Published

A fully self-contained, customizable flip clock countdown React component

Downloads

271

Readme

@hasthiya_/flip-clock

A customizable flip clock countdown for React with realistic 3D flip-card animations.

npm version license

Live Demo: flip-clock-livid.vercel.app | Demo | Docs | Examples | GitHub

Features

  • Countdown to any target date or display static time values
  • Fully customizable card colors, digit fonts, labels, separators, and animations
  • Smooth 3D flip-card effect with configurable bounce
  • Zero CSS dependencies — all styles are inline
  • Lightweight with React as the only peer dependency
  • Responsive-ready with scale and orientation props

Installation

npm install @hasthiya_/flip-clock
# or
pnpm add @hasthiya_/flip-clock
# or
yarn add @hasthiya_/flip-clock

Basic Usage

import FlipClock from "@hasthiya_/flip-clock";

<FlipClock targetDate={new Date("2026-12-31T00:00:00")} />

Note: In Next.js, use it inside a Client Component ("use client").

Examples

Custom Styling

<FlipClock
  targetDate={deadline}
  cardStyle={{
    background: "#1e1e2e",
    backgroundDark: "#181825",
    borderRadius: "1rem",
  }}
  digitStyle={{
    color: "#cba6f7",
    fontFamily: "monospace",
    fontSize: "4rem",
  }}
  labelStyle={{ color: "#a6adc8", fontSize: "0.75rem" }}
  animation={{ bounceIntensity: 15, flipDuration: 400 }}
  separator={{ type: "colon", color: "#cba6f7" }}
  groupGap="2rem"
  onComplete={() => console.log("Done!")}
/>

Static Display

<FlipClock
  staticTime={{ days: 12, hours: 8, minutes: 45, seconds: 30 }}
  segments={{ days: false, hours: true, minutes: true, seconds: true }}
/>

Responsive with Scale

<FlipClock
  targetDate={myDate}
  scale={0.75}
  orientation="column"
/>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | targetDate | Date | 88 days from now | The target date to count down to | | staticTime | { days?, hours?, minutes?, seconds? } | — | Override with static values (disables auto-tick) | | cardStyle | FlipCardStyle | — | Card appearance: background, backgroundDark, width, height, borderRadius, boxShadow | | digitStyle | FlipDigitStyle | — | Digit typography: color, fontFamily, fontSize, textShadow | | labelStyle | FlipLabelStyle | — | Label config: visible, color, fontFamily, fontSize, fontWeight, letterSpacing, textTransform | | lineStyle | FlipLineStyle | — | Horizontal divider line: color, height | | animation | FlipAnimationConfig | — | Animation config: flipDuration, bounceIntensity, flipDownEasing, flipUpEasing | | separator | FlipSeparatorConfig | none | Separator between groups: type ('none' | 'colon' | 'dot'), color, size | | labels | FlipClockLabels | — | Custom label text: days, hours, minutes, seconds | | segments | FlipClockSegments | all true | Which segments to display: days, hours, minutes, seconds | | dayDigits | number | 2 | Number of digits for the days display | | groupGap | string | '3rem' | Gap between time groups (CSS value) | | cardGap | string | '0.375rem' | Gap between individual digit cards (CSS value) | | labelGap | string | '1rem' | Gap between cards and the label (CSS value) | | onComplete | () => void | — | Callback fired when countdown reaches zero | | orientation | 'row' | 'column' | 'row' | Layout direction: row (horizontal) or column (stacked) | | scale | number | 1 | Scale factor for the whole clock (e.g., 0.8 for 80% size) | | className | string | — | Additional className for the outer wrapper | | style | CSSProperties | — | Additional inline style for the outer wrapper |

Style Configuration Types

FlipCardStyle

| Property | Type | Default | |----------|------|---------| | background | string | '#575757' | | backgroundDark | string | '#4a4a4a' | | width | string | '7rem' | | height | string | '9.5rem' | | borderRadius | string | '0.5rem' | | boxShadow | string | '0 3px 8px rgba(0,0,0,0.25)' |

FlipDigitStyle

| Property | Type | Default | |----------|------|---------| | color | string | '#ffffff' | | fontFamily | string | "'Bebas Neue', sans-serif" | | fontSize | string | '5.5rem' | | textShadow | string | 'none' |

FlipLabelStyle

| Property | Type | Default | |----------|------|---------| | visible | boolean | true | | color | string | '#999999' | | fontFamily | string | "'Inter', sans-serif" | | fontSize | string | '0.9rem' | | fontWeight | string | '500' | | letterSpacing | string | '0.2em' | | textTransform | CSSProperties['textTransform'] | 'uppercase' |

FlipAnimationConfig

| Property | Type | Default | |----------|------|---------| | flipDuration | number | 300 (ms) | | bounceIntensity | number | 8 (degrees) | | flipDownEasing | string | 'ease-in' | | flipUpEasing | string | 'ease-out' |

FlipSeparatorConfig

| Property | Type | Default | |----------|------|---------| | type | 'none' | 'colon' | 'dot' | 'none' | | color | string | '#999999' | | size | string | '0.5rem' |

License

MIT