Skip to content

CountdownPro

A launch countdown with digits that roll per unit, a compact one-line variant, hours absorbing days when days are hidden, and a live state with a pulsing dot at zero.

oxyn add countdown
02days
07hours
33minutes
20seconds
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • A launch countdown: large digits with unit labels (each value rises in when it changes) or one compact line for banners and table cells; units can drop days so hours absorb them (hours pass 24); at zero it morphs into a live state with a pulsing dot.

When not to use

  • A total that moves clearly: use Animated counter instead.
  • A collapsible JSON tree with search, paging for long arrays, copy value or path, the current path under the tree and full keyboard moves: use JSON viewer instead.
  • A word-level diff for prose: use Inline Diff instead.

Installation

Countdown is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add countdown

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Large

Days to seconds.

02days
07hours
33minutes
20seconds
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Compact

One line.

2d 07:33:20
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Live

Reaches zero, then Live now.

00days
00hours
00minutes
05seconds
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Hours

Hours absorb days.

55hours
33minutes
20seconds
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

Countdown

PropTypeDefaultDescription
modelrequiredCountdownModel—Model.
nowrequiredClockMs—Shared clock.
variantString"large"`large` · `compact`.
daysbooltrueShow days (when false, hours absorb them).
complete_labelString"Live now"Shown after zero.
labelString"Time remaining"Accessible name.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
—Not interactive

Accessibility

  • role=timer with an accessible name (“Keynote starts in”).
From the spec
  • role=timer with an accessible name.

Motion & interaction

Timing
  • Reduced motion: no entrance rise, no shimmer (static muted text), rings and bars jump to their value.

Responsive behaviour

  • Large digits wrap by unit; compact fits table cells.
Edge cases (spec)
  • Large wraps by unit.

Notes for AI

  • Import Countdown from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: CountdownEl in oxyn_gpui.
  • Props to set first: model, now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI