Countdown CTA
A conversion section built around a live-ticking countdown timer, an urgency badge, and a single call-to-action button. Perfect for launches, flash sales, and other time-sensitive promotions.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, badge dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/countdown-cta.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/cta/cta26.tsx instead.
Usage
The file also exports cta26Demo, 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 { Cta26, cta26Demo } from "@/components/blocks/cta/cta26"; export default function Page() { return <Cta26 {...cta26Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| badgeLabel | string | "Limited time offer" | Text inside the urgency badge above the heading. |
| heading | string | "The launch discount ends soon" | Main heading. |
| description | string | "Lock in 40% off your first year..." | Supporting copy under the heading. |
| targetDate | string | none | ISO date string the countdown ticks down to, e.g. "2026-09-01T00:00:00Z". Required. |
| primaryLabel | string | "Claim your discount" | Call-to-action button label. |
| primaryHref | string | "#" | Link target for the call-to-action button. |
| className | string | none | Extra classes for the outer section element. |
Behavior notes
- The Days/Hours/Minutes/Seconds tiles are a real, live-ticking countdown: a useState<number | null> holds the milliseconds remaining until the targetDate prop, and a useEffect starts a setInterval(tick, 1000) that recomputes it every second, cleaning up the interval on unmount.
- The countdown never uses Date.now()/new Date() directly in the render path, only inside the effect's tick function, so server-rendered and card-thumbnail output stay stable until the client hydrates and the timer starts running.
- The call-to-action button is decorative: it renders as a real Next.js Link via the button's render prop, but defaults to "#" and doesn't perform a real checkout or navigation of its own.
More CTA Blocks
View all →centered-newsletter-cta
Centered Newsletter CTA
Minimal centered call-to-action with heading, description, and action buttons.
split-layout-newsletter-cta
Split Layout Newsletter CTA
Two-column call-to-action with a decorative image on one side and a feature list plus subscribe form on the other.
newsletter-social-proof-cta
Newsletter CTA with Social Proof
Newsletter call-to-action with an avatar stack, subscriber count, and a testimonial quote.
banner-cta
Banner CTA
Horizontal banner call-to-action with heading and action buttons side by side.
stats-cta
Stats CTA
Call-to-action section with impressive statistics and trust indicators above action buttons.
multi-card-cta
Multi-Card CTA
Three action cards side by side, each offering a different path to conversion.