Press and hold to delete, with a meter while you hold and five seconds to undo.
Import it and pass your content. The props that matter most are listed next.
"use client";
import { ConfirmButton } from "@/components/ui/notchset/confirm-button";
/** Soft delete with an undo window; delete for good when it expires. */
export function DeleteAgent({ agentId, markDeleted, restore, deleteForever }: { agentId: string; markDeleted: (id: string) => void; restore: (id: string) => void; deleteForever: (id: string) => void }) {
return (
<ConfirmButton
target="PLANNER-V13"
labels={{ hold: "DELETE AGENT" }}
onConfirm={() => markDeleted(agentId)}
onUndo={() => restore(agentId)}
onExpire={() => deleteForever(agentId)}
/>
);
}holdMs–
numberHow long to hold (ms). Default 1200.
undoMs–
numberHow long Undo stays (ms). Default 5000; 0 for none.
target–
stringWhat is deleted, for the help line and its announcement.
onConfirm–
() => voidCalled when the hold completes.
onUndo–
() => voidCalled when Undo is pressed.
onExpire–
() => voidThe undo window ran out: the deletion is final.
labels–
Partial<ConfirmButtonLabels>Every word, for other languages.
ConfirmButtondata-slot="confirm-button"
The legend and meter, the key on its plate, and the help or Undo row.
Keydata-slot="confirm-button-key"
The button you hold.
Undodata-slot="confirm-button-undo"
The Undo key and its draining nodes.
components/ui/notchset/confirm-button.tsx
pnpm dlx shadcn@latest add https://notchset.dev/r/confirm-button.jsonpnpm dlx shadcn@latest add https://notchset.dev/r/radix-nova/confirm-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