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 countdownThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
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.
oxyn add countdownUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Large
Days to seconds.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Compact
One line.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Live
Reaches zero, then Live now.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Hours
Hours absorb days.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
Countdown
| Prop | Type | Default | Description |
|---|---|---|---|
modelrequired | CountdownModel | — | Model. |
nowrequired | ClockMs | — | Shared clock. |
variant | String | "large" | `large` · `compact`. |
days | bool | true | Show days (when false, hours absorb them). |
complete_label | String | "Live now" | Shown after zero. |
label | String | "Time remaining" | Accessible name. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| — | 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
Countdownfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
CountdownElinoxyn_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.