Ruixen Pro is now live.50+ premium components, templates, blocks, and lifetime updates.

Command Palette

Search for a command to run...

Docs
Banner Countdown

Banner Countdown

A countdown banner with Fluid Numerals — odometer-style rolling digits, colon heartbeat, and height-collapse dismiss.

Installation

Usage

import BannerCountdown from "@/components/ruixen/banner-countdown";
 
const saleEnd = new Date(Date.now() + 24 * 60 * 60 * 1000);
 
export default function MyCountdown() {
  return (
    <BannerCountdown
      title="Flash Sale ends in"
      endDate={saleEnd}
      action={{ label: "Shop now", href: "/sale" }}
      onExpire={() => console.log("Sale ended!")}
    />
  );
}

Props

PropTypeDefaultDescription
titlestring-Text displayed before the countdown
endDateDate-Target date for the countdown
action{ label: string; href: string }-Action link with arrow
onExpire() => void-Callback when countdown reaches zero
onDismiss() => void-Callback fired after dismiss animation
classNamestring-Additional CSS classes