Auto run timer (Pro)
ProIncluded in $99An action that runs by itself unless stopped, with the time left draining round the Cancel button.
On this page
ProThe next command runs in 5 s: the time left drains round Cancel, holds while you point at it, and gives way to a run check at zero.
Agents that run steps on their own still need a moment to be stopped. The time left is drawn round the Cancel button, its outline draining as the seconds roll down. Point at the row and the clock holds while it waits for you; move away and it carries on. Cancel snaps the outline back and offers Run now. At zero the button gives way to a run check.
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { AutoRunTimer } from "@/components/ui/chatcn/pro/auto-run-timer"
<AutoRunTimer
action="pnpm biome check lib/session.ts"
status={status}
seconds={5}
onRun={run}
onCancel={cancel}
onRunNow={run}
/>Examples
States
ProThe same command in each state of the timer.
Props
| Prop | Type | Notes |
|---|---|---|
action | string | What will run |
status | "counting" | "running" | "done" | "cancelled" | |
seconds | number | Default 5 |
onRun | () => void | At zero |
onCancel / onRunNow | () => void | |
icon | ReactNode | Replaces the terminal glyph |
Accessibility
- Focus inside the row holds the clock too, so keyboard users get the same time to decide.
- The time left is a polite live region that changes once a second.
Motion
- One frame clock that only advances while not held; the outline is
stroke-dasharrayon apathLength100 rect. - The number re-renders once per second, not per frame.