Timer
display
Timer: counts down from a duration to zero
Terminal
$termuijs render timer
Installation
$ bunx termuijs add timer
Copies the source into src/components/timer/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { Timer } from '@termuijs/widgets'ts
new Timer(options: TimerOptions, style: Partial<Style> = {})API Reference
Timer
| Prop | Type | Required | Description |
|---|---|---|---|
duration | number | required | Duration to count down from in milliseconds |
interval | number | optional | Tick interval in milliseconds |