5Sponsor

Timer

Countdown timer with pause/resume and auto-start

Terminal
timer-demo
No opentui live preview is registered for this example yet.

Installation

pnpm dlx shadcn@latest add @termcn/timer

Usage

import { Timer } from "@/components/ui/timer";
<Timer duration={300} format="ms" label="Pomodoro" autoStart />

API Reference

Timer

PropTypeDefault
durationnumberrequired
onComplete() => voidundefined
autoStartbooleanfalse
format"hms" | "ms" | "s""hms"
colorstringundefined
labelstringundefined