480
Sponsor

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/opentui-timer

Usage

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

API Reference

Timer

PropTypeDefault
durationnumberrequired
onComplete() => void-
autoStartbooleanfalse
format"hms" | "ms" | "s""hms"
colorstring-
labelstring-