X Enterprises
nuxt-x-affiliate

Countdown

Live countdown timer for limited-time offers — auto-hides on expiry or shows "Expired" badge.

Countdown

The XAFCountdown component is a live ticking days/hours/minutes/seconds timer for limited-time offers, product launches, or deal expirations. Auto-updates every second client-side and either hides or shows an "Expired" badge when the end time passes.

Components

<XAFCountdown />

<XAFCountdown
  ends-at="2026-12-31T23:59:59Z"
  title="Black Friday deal"
  body="Up to 40% off our top-rated picks."
  cta-href="/black-friday"
  cta-label="Shop the sale"
/>

Props

PropTypeDefaultDescription
endsAtstringrequiredTarget end time as ISO date string.
titlestring"Limited-time offer"Optional headline.
bodystringOptional body copy.
ctaHrefstringCTA link target.
ctaLabelstring"Shop now"CTA button label.
onExpire'hide' | 'show-expired''hide'What to render once the timer hits zero.

The timer block uses role="timer" with aria-live="polite" so screen readers announce the running countdown (and the expired state).


AI Context

component: XAFCountdown
package: "@xenterprises/nuxt-x-affiliate"
use-when: Live countdown timer for limited-time offers with auto-expiry handling (hide or show "Expired" badge).
Copyright © 2026