Skip to content

Stopwatch

widgetsdisplay

Stopwatch: counts up from zero, displaying elapsed time

Installation

$ bunx termuijs add stopwatch

Copies the source into src/components/stopwatch/ and installs @termuijs/core, @termuijs/widgets.

Usage

ts
import { Stopwatch } from '@termuijs/widgets'
ts
new Stopwatch(options: StopwatchOptions = {}, style: Partial<Style> = {})

API Reference

Stopwatch

PropTypeRequiredDescription
intervalnumberoptionalTick interval in milliseconds
#display#stopwatch