Skip to content
Sign upGet access
MicrointeractionsAuto run timerMenu

Auto run timer (Pro)

ProIncluded in $99

An action that runs by itself unless stopped, with the time left draining round the Cancel button.

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

$ pnpm dlx shadcn@latest add @chatcn-pro/auto-run-timer

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

tsx
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

PropTypeNotes
actionstringWhat will run
status"counting" | "running" | "done" | "cancelled"
secondsnumberDefault 5
onRun() => voidAt zero
onCancel / onRunNow() => void
iconReactNodeReplaces 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-dasharray on a pathLength 100 rect.
  • The number re-renders once per second, not per frame.