E-commerce
FlashSaleTimer
Countdown timer with HH:MM:SS display and sale badge for flash promotions.
Quick Preview
๐ฅ Flash SaleFlash Sale ends in
00
HRS
00
MIN
00
SEC
Installation
# No extra dependencies
// Copy component fromsrc/components/ecommerce/FlashSaleTimer.tsx
Usage
import FlashSaleTimer from '@/components/ecommerce/FlashSaleTimer'// Provide an end date for the countdown<FlashSaleTimerendDate={new Date(Date.now() + 2 * 60 * 60 * 1000)} // 2 hours from nowtitle="Flash Sale"discount="40% OFF"/>
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
endTime | Date | - | Sale end time (defaults to +3h47m22s from now) |
label | string | - | Text shown next to the timer |
badgeText | string | - | Badge label (e.g. Flash Sale) |
className | string | - | Additional CSS classes |