Deal of the Day Hero
A large featured-product hero with a live countdown, a discount badge, and a feature list, built to create urgency around a single deal. Meant for a homepage or promotions page spotlighting one product, not a grid of multiple deals.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its badge, button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/deal-of-the-day-hero.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/ecommerce/ecommerce28.tsx instead.
Usage
The file also exports ecommerce28Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Ecommerce28, ecommerce28Demo } from "@/components/blocks/ecommerce/ecommerce28"; export default function Page() { return <Ecommerce28 {...ecommerce28Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| badgeLabel | string | "Deal of the Day" | Label on the primary badge. |
| discountLabel | string | "-40%" | Label on the discount badge. |
| productName | string | none | Featured product's name. |
| description | string | undefined | Short paragraph under the product name. |
| originalPrice | string | none | Pre-formatted original price, shown struck through. |
| salePrice | string | none | Pre-formatted sale price, shown at full size. |
| features | string[] | [] | Bullet list of product highlights. |
| durationSeconds | number | 8 * 3600 + 24 * 60 + 15 | Fixed countdown length in seconds; ticks down once per second from this literal, never derived from the system clock. |
| ctaLabel | string | "Claim this deal" | Label on the CTA button. |
| ctaHref | string | "#" | Destination for the CTA button. |
| image | { src: string; alt: string } | undefined | Featured product photo; falls back to a centered ShoppingBag icon when omitted. |
| className | string | none | Extra classes for the outer section element. |
Behavior notes
- The countdown starts from the fixed durationSeconds literal and decrements once per second via setInterval; it never reads Date.now() or a target Date, so it does not reflect real wall-clock time and simply restarts from the same duration on every page load.
- When the countdown reaches zero it stays at 00:00:00 rather than looping or hiding, since this is a decorative urgency timer, not a real deal-expiry mechanism.
- The CTA is a real Link-backed button (navigates to ctaHref); the countdown itself has no effect on whether the button is clickable.
- A missing image falls back to a centered ShoppingBag icon on a muted background instead of a broken image.
More Ecommerce Blocks
View all →wishlist-manager
Wishlist Manager
Saved-items list with stock-status badges, move-to-cart and remove actions, and a real empty state.
product-information-tabs
Product Information Tabs
Tabbed product details with Description, Features, Specifications, Reviews, and Shipping panels.
collection-showcase-grid
Collection Showcase Grid
A large featured-collection hero card alongside a grid of smaller supporting collection tiles.
shop-by-brand-grid
Shop by Brand Grid
A grid of bordered brand tiles with a wordmark-style name, product count, and a hover affordance.
sale-countdown-timer
Sale Countdown Timer
A live days/hours/minutes/seconds countdown in default, compact, or full-width banner layouts.
gift-card-redemption-form
Gift Card Redemption Form
A code-entry form that validates against a fixed list of demo gift cards and shows a real success or error state.