Getting startedComponentsDesign tokensThemingTheme synthesizerFrameworksAccessibilityUtilitiesServer renderingBrowser supportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting startedFrameworksServer renderingDesign tokensThemingTheme synthesizerTypographyUtilitiesAll componentsAccessibilityBrowser supportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Countdown Timer

Counts down to a date and time in days, hours, minutes and seconds, and fires an event at zero.

ComponentsCountdown Timer
datainteractive
<arc-countdown-timer>

Overview

CountdownTimer counts down to the date in `target`, which takes an ISO 8601 string or anything `new Date()` can parse. A date and time without a time zone is read as the visitor's local time, but a date on its own, such as `2027-01-01`, is read as midnight UTC. The display is four segments, labeled Days, Hours, Min and Sec, with colons between them. Each number is at least two mono digits with `tabular-nums`, so the width doesn't change as it ticks. A countdown of 100 days or more shows three digits of days. It recalculates every second and stops its interval when removed from the page. At zero it fires `arc-expired` once and replaces the segments with the `expired` text, which defaults to "Expired". Setting a new `target` starts it again. `label` adds an uppercase line above the countdown, such as "Sale ends". `hide-zero-segments` hides segments whose value is zero, so a countdown under a day drops the Days segment.

Guidelines

Do

  • Use it for event countdowns, product launches and sale deadlines
  • Set a `label` that says what's being counted down to, such as "Launches in" or "Offer ends"
  • Set `expired` to text that fits, such as "Now live"

Don't

  • Don't use it for elapsed time or as a stopwatch. It only counts down
  • Don't set a target in the past unless you want the expired text straight away
  • Don't enforce deadlines with it. Check them on the server

Features

  • Numbers use the accent text gradient, and segments get the interactive hover shadow
  • CSS parts: `container`, `segment`, `number`, `label`, `separator`

Preview

Usage

Countdown Timer is in the marketing group, so the default @arclux/arc-ui entry point doesn't include it. Import it from@arclux/arc-ui/marketing or from its own subpath,@arclux/arc-ui/countdown-timer.

This component needs JavaScript. Use the Web Component or a framework wrapper.

<!-- New Year countdown -->
<arc-countdown-timer
  target="2026-12-31T00:00:00"
  label="New Year"
></arc-countdown-timer>

<!-- Product launch with custom expired text -->
<arc-countdown-timer
  target="2026-06-15T09:00:00"
  label="Launches In"
  expired="Now Live!"
></arc-countdown-timer>

<!-- Short countdown, hiding zero segments -->
<arc-countdown-timer
  target="2026-03-01T18:00:00"
  hide-zero-segments
></arc-countdown-timer>

API

targetstring''
ISO date string or parseable date for the countdown target
labelstring''
Optional label displayed above the countdown
expiredstring'Expired'
Text shown when the countdown reaches zero
hideZeroSegmentsbooleanfalse
Hide leading segments that are zero

Events

arc-expired
Fired when the countdown reaches zero

See also