A start button that turns into its own stop control while an agent or job runs.
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { RunButton } from "@/components/ui/notchset/run-button";
const STEPS = ["plan", "search_docs", "read_file", "run_sql", "draft", "verify"];
/** onRun returns a promise: the key shows running until it settles, and the abort signal stops it. */
export function RunPlanner({ runAgent }: { runAgent: (signal: AbortSignal, onStep: (i: number) => void) => Promise<void> }) {
const [step, setStep] = React.useState(0);
return <RunButton legend="F4 · RUN" name="PLANNER" steps={STEPS} step={step} onRun={(signal) => runAgent(signal, setStep)} />;
}onRun–
(signal: AbortSignal) => unknownStarts the run. Return a Promise and the button tracks it; Stop aborts the signal.
onStop–
() => voidCalled when the user stops the run.
state–
"idle" | "running" | "stopped" | "complete"Controlled state. Uncontrolled, Stopped and Complete hold 2.8s, then return to idle.
steps–
string[]The run's steps, drawn as nodes under the key.
step–
numberThe current step index.
elapsedMs–
numberElapsed time while running; counted by the button when omitted.
kbd–
stringThe shortcut shown while idle (display only). Default "R".
legend / name–
stringThe legend above the key; the first word of the idle status.
status–
stringOverrides the status line.
labels–
Partial<RunButtonLabels>Every word, for other languages.
RunButtondata-slot="run-button"
The key, its legend, the step track and the status line.
Keydata-slot="run-button-key"
The button itself.
Trackdata-slot="run-button-track"
The step nodes and their trace.
components/ui/notchset/run-button.tsx
pnpm dlx shadcn@latest add https://notchset.dev/r/run-button.jsonpnpm dlx shadcn@latest add https://notchset.dev/r/radix-nova/run-button.jsonFree, no account or key. Use the command for your project's primitives: a radix-*, new-york or default style in components.json is Radix, a base-* style is Base UI. With the @notchset registry added, @notchset/<name> picks for you.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Give your coding assistant the Markdown guide instead of screenshots.
https://notchset.dev/api/mcp (setup)v1.0.0 · 2026-10-02
First release