TimeDisplay
atomsA "1:02 / 23:45" media readout in tabular numbers; click toggles to time remaining, live streams show the position only.
Player transport
current and duration in seconds; the readout is a button that flips to the remaining time, and bind:remaining keeps the choice.
Night Drive Kaleido · Neon Rain
Sizes, remaining and formats
size sm/md; remaining starts on the countdown; toggle={false} renders a static span; formatTime swaps the formatter.
sm md remaining 1:0223:45static custom format
Live, unknown and edge durations
duration null or Infinity = live (position only, no toggle); zero, a position past the end, hours-long media and a hidden-numbers check.
Live1:01:11
live 0:12Infinity 0:00empty past the end hours hours leftProps
| Prop | Type | Default | Description |
|---|---|---|---|
current | number | 0 | Position in seconds. |
duration | number | null | null | Duration in seconds; `null`/`Infinity` = live or unknown. |
remaining bindable | boolean | false | Show time left instead of the position. |
toggle | boolean | true | Allow clicking to toggle `remaining`. |
size | 'sm' | 'md' | 'sm' | |
formatTime | (seconds: number, ref?: number) => string | formatMediaTime | |
toggleLabel | string | 'Toggle remaining time' | |
class | string | '' |