A card for a change that spreads, confirmed by press and hold: region nodes light along a trace as the hold runs, letting go drains them and changes nothing, and a landed change offers Restore while five dots count down.
pnpm dlx shadcn@latest add @beautiful-ui-pro/hold-to-confirmNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
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.
Import it and pass your content. The props that matter most are listed next.
"use client";
import { HoldToConfirm } from "@/components/ui/notchset/hold-to-confirm";
export function RollbackControl({ rollback, restore }: { rollback: () => void; restore: () => void }) {
return <HoldToConfirm onConfirm={rollback} onUndo={restore} />;
}duration / steps–
numberThe hold (1400ms) and the nodes on the trace (12).
onConfirm / onUndo–
() => voidWhen the hold lands; when Restore is pressed.
undoWindow–
numberHow long Restore is offered (5000ms), one dot a second.
labels–
Partial<HoldLabels>Kicker, statuses, unit, regions, from/to, key labels and help lines.
disabled / disabledReason–
boolean / stringThe reason shows in the help line.
components/ui/notchset/hold-to-confirm.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.