About
Make a change on screen at once, offer Undo during a countdown, and send the request only when it ends.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Undoable Action to your project and fits it to your theme.
Code
How Undoable Action is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client"
import "honestui/theme.css";
import {
UndoBar,
type UndoableAction,
type UndoableEntry,
} from "@/components/ui/honest-undoable-action"
const entries: UndoableEntry[] = [
{
id: "waiting",
message: "Archived 3 conversations",
phase: "waiting",
duration: 6000,
remaining: 4000,
deadline: null,
},
{
id: "committing",
message: "Archived “Invoice #1042 is paid”",
phase: "committing",
duration: 6000,
remaining: 0,
deadline: null,
},
{
id: "failed",
message: "Archived “Offsite agenda”",
phase: "failed",
duration: 6000,
remaining: 0,
deadline: null,
error: new Error("The server could not be reached."),
},
]
const noop = () => {}
const still: UndoableAction = {
entries,
paused: true,
lastEvent: null,
run: () => "",
undo: noop,
retry: noop,
dismiss: noop,
setPaused: noop,
flush: noop,
}
/** A still picture of the three states. The buttons here are not connected to anything. */
export default function UndoableActionStates() {
return (
<div data-theme="light" className="w-full max-w-lg min-w-0">
<UndoBar action={still} labels={{ region: "Every undo state" }} />
</div>
)
}
















