RunControls
Pause or resume, stop, then retry once a run has ended, with elapsed time and step count. AI.
Open playgroundRunning 0:41Step 4 of 9
About
RunControls is a React component in the AI category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { RunControls } from "@ashutoshswamy/smoui" and set status, elapsedMs, step among its 4 props.
Install
npm i @ashutoshswamy/smouiUsage
import { RunControls } from "@ashutoshswamy/smoui";
<RunControls status="running" elapsedMs={41000} step={4} steps={9} onPause={pause} onStop={stop} />Props 4
- status
Run state.
"running""paused""done""error"- elapsedMs
You drive it; the bar formats it.
number- step / steps
Progress text.
number- onPause / onResume / onStop / onRetry
Button handlers.
() => void
More ai components
- AgentPickerChoose which agent takes the job. Cards show purpose, tools and cost; a marker slides between them and arrow keys move.
- AgentStatusPillOne pill for what an agent is doing: ready, thinking, using a tool, waiting on you or failed. The glyph and width morph between states.
- AgentTraceA run as a waterfall. Spans nest under the step that started them, bars sit at their real start and length, parents fold away children.
- AiOrbA living orb for voice and agent states: breathes, swells with sound, turns while thinking.
- ApprovalGateAn agent asks before it runs a tool. Review the input, edit it, approve once or always, or deny; the card settles into its decision.
- AttachmentChipA file waiting to be sent. A ring fills around the tile while it uploads, a warning and a Retry button replace it on failure, and remove sits inside the chip.